上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 20 下一页
摘要: 如果一些边长互不相同的正方形,可以恰好拼出一个更大的正方形,则称其为完美正方形。历史上,人们花了很久才找到了若干完美正方形。比如:如下边长的22个正方形2 3 4 6 7 8 12 13 14 15 16 17 18 21 22 23 24 26 27 28 50 60如下图那样组合,就是一种解法。 阅读全文
posted @ 2020-03-07 19:27 Hazelxcf 阅读(337) 评论(0) 推荐(0)
摘要: 大佬的博客 https://www.cnblogs.com/hyfhaha/p/10802604.html P3808 【模板】AC自动机(简单版) https://www.luogu.com.cn/problem/P3808 #include<bits/stdc++.h> #define maxn 阅读全文
posted @ 2020-03-04 15:55 Hazelxcf 阅读(146) 评论(0) 推荐(0)
摘要: https://www.luogu.com.cn/problem/P2580 #include <bits/stdc++.h> using namespace std; const int maxn = 5e5 + 5; int n,m; string s; int num; struct node 阅读全文
posted @ 2020-03-03 20:28 Hazelxcf 阅读(114) 评论(0) 推荐(0)
摘要: https://www.luogu.com.cn/problem/P3805 len[i] 表示以 str[i] 为中心的回文子串的半径,len[i] = 1,表示回文串就是str[i]本身 #include <bits/stdc++.h> using namespace std; const in 阅读全文
posted @ 2020-03-03 16:47 Hazelxcf 阅读(127) 评论(0) 推荐(0)
摘要: hash好像可以暴力水过很多字符串算法 1、kmp 问题:给两个字符串S1,S2,求S2是否是S1的子串,并求S2在S1中出现的次数 把S2 Hash出来,在S1里找所有长度为|S2| 2、AC自动机 问题:给N个单词串,和一个文章串,求每个单词串是否是文章串的子串,并求每个单词在文章中出现的次数。 阅读全文
posted @ 2020-03-03 11:26 Hazelxcf 阅读(125) 评论(0) 推荐(0)
摘要: https://ac.nowcoder.com/acm/problem/15253 可以先把模式串拆分,计算出每部分,然后排序 读入模式串,匹配这两部分 #include <bits/stdc++.h> using namespace std; typedef long long ll; typed 阅读全文
posted @ 2020-03-02 17:59 Hazelxcf 阅读(160) 评论(0) 推荐(0)
摘要: 1、数论 大概有素数测试(筛法),扩展欧几里得算法,同余模运算,高斯消元,中国剩余定理,莫比乌斯反演等等。 同余模运算:poj2635, poj3292,poj1845,poj2115 素数测试与筛法:poj2191,poj1811 高斯消元:poj1681,poj1222 扩展欧几里得算法:poj 阅读全文
posted @ 2020-03-02 15:41 Hazelxcf 阅读(155) 评论(0) 推荐(0)
摘要: 二维前缀和 1002. 二哥种花生 https://acm.sjtu.edu.cn/OnlineJudge/problem/1002 #include <bits/stdc++.h> using namespace std; const int maxn = 1e3 + 5; int l,w; in 阅读全文
posted @ 2020-03-01 17:55 Hazelxcf 阅读(212) 评论(0) 推荐(0)
摘要: https://www.luogu.com.cn/problem/P1341 https://blog.csdn.net/STILLxjy/article/details/51956183?depth_1-utm_source=distribute.pc_relevant.none-task&utm 阅读全文
posted @ 2020-02-29 16:07 Hazelxcf 阅读(189) 评论(0) 推荐(0)
摘要: https://www.luogu.com.cn/problem/P1330 #include<bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; int cnt[2]; int color[maxn]; vector<int> 阅读全文
posted @ 2020-02-28 22:13 Hazelxcf 阅读(87) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 20 下一页