摘要: 是质数并且质数编号也是质数筛一下二分查初位暴力查下位#include #include using namespace std;typedef long long ll;const int MAXN = 1e6 ... 阅读全文
posted @ 2018-08-04 16:21 张浦 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 循环四个方向复制当前图形用函数解决非常简便最后符号换行很有乐趣公式不好算出来可以暴力搜索啊哈哈哈哈#include #include using namespace std;const int MAXN = 1e... 阅读全文
posted @ 2018-08-04 15:54 张浦 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 基础贪心和安排教室一个思路多线程往下安排即可 #include #include using namespace std;const int MAXN = 1e5 + 10;struct bn{ int ... 阅读全文
posted @ 2018-08-04 12:17 张浦 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 拓展kmp int Next[MAXN], extand[MAXN]; char s[MAXN]; void getNext(char *T) {// Next[i]: 以第i位置开始的子串 与 T的公共前缀 int i, length = strlen(T); Next[0] = length; 阅读全文
posted @ 2018-08-04 11:20 张浦 阅读(78) 评论(0) 推荐(0) 编辑