摘要: 软件下载devc++5.11: https://sm.myapp.com/original/Development/Dev-Cpp_5.11_TDM-GCC_4.9.2_Setup.exe 新建一个c++代码文件 写代码 + 编译 +(调试)= 大家常见的exe可执行文件 代码结构(初级) #inc 阅读全文
posted @ 2020-02-05 19:11 pai_hoo 阅读(406) 评论(1) 推荐(1) 编辑
摘要: 这才是正确的prim算法! 真正的prim,根本不用初始化d[]数组 并且没有所谓的松弛操作 恕我直言,网上的代码都是冗余的 #include<iostream> #include<cstdio> #define ri register int #define u int namespace opt 阅读全文
posted @ 2019-11-15 21:23 pai_hoo 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 倍增爬 #include<iostream> #include<cstdio> #define ri register int #define u int namespace opt { inline u in() { u x(0),f(1); char s(getchar()); while(s< 阅读全文
posted @ 2019-11-15 20:35 pai_hoo 阅读(101) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.org/problem/P3387 注意核心代码 #include<iostream> #include<cstdio> #define ri register int #define u int namespace opt { inline u in() { u 阅读全文
posted @ 2019-11-15 19:57 pai_hoo 阅读(121) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.org/problem/P3386 注意对匈牙利增广路算法的理解 #include<iostream> #include<cstdio> #define ri register int #define u int namespace opt { inline u 阅读全文
posted @ 2019-11-15 14:03 pai_hoo 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 贪心,很有难度!!! #include<iostream> #include<cstdio> #define ri register int #define u int namespace opt { inline u in() { u x(0),f(1); char s=getchar(); wh 阅读全文
posted @ 2019-11-15 00:38 pai_hoo 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 比较简单的按一定规则排序后贪心, 用相邻项交换证明 但是要高精,用phy3水了个AC 阅读全文
posted @ 2019-11-14 17:03 pai_hoo 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 比较难的贪心! 预处理很多东西, 另外,写注释好像有点用!(可能是心理作用?) 反正还是写得挺顺利的??! #include<iostream> #include<cstdio> #define ri register int #define u int namespace opt { inline 阅读全文
posted @ 2019-11-14 16:55 pai_hoo 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 一般题思想巨头: 1.贪心 get 2.动态规划 get 3.二分答案 get 4.搜索 get 5.栈与队列 get 6.分治 get 图论思想巨头: 1.最短路(径树)get 2.最小生成树(上) 3.并查集(普通,带权,扩展域)(维护连通性,表示什么属于同一类) get 4.二分图 5.树上差 阅读全文
posted @ 2019-11-14 16:18 pai_hoo 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 先区间DP处理区间单词个数,在线性DP一次求出答案,注意词典里可能有重复单词 #include<iostream> #include<cstdio> #define ri register int #define u unsigned long long namespace opt { inline 阅读全文
posted @ 2019-11-13 20:51 pai_hoo 阅读(125) 评论(0) 推荐(0) 编辑