2015年9月3日
摘要: struct ACauto{ int ch[maxn][26]; int sz; int f[maxn],last[maxn],val[maxn],cnt[maxn]; void init(){ sz=1; memset(ch[0],0,sizeo... 阅读全文
posted @ 2015-09-03 18:36 Beserious 阅读(207) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include#define maxn 10000using namespace std;int f[maxn];void getfail(char *p,int *f){ int m=strlen(p); f[0]=0;... 阅读全文
posted @ 2015-09-03 15:23 Beserious 阅读(268) 评论(0) 推荐(0) 编辑
摘要: Cyclic NacklaceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4420Accepted Submission(s): 2011Pro... 阅读全文
posted @ 2015-09-03 15:02 Beserious 阅读(213) 评论(0) 推荐(0) 编辑
  2015年8月27日
摘要: 时间复杂度O(m*n)#include #include #include #include #include #include #include #include #define INF 0x3f3f3f3f#define maxn 10000+10#define cle(a) memset(a,... 阅读全文
posted @ 2015-08-27 14:39 Beserious 阅读(416) 评论(0) 推荐(0) 编辑
摘要: PalindromeTime Limit:3000MSMemory Limit:65536KTotal Submissions:56756Accepted:19631DescriptionA palindrome is a symmetrical string, that is, a string ... 阅读全文
posted @ 2015-08-27 14:06 Beserious 阅读(174) 评论(0) 推荐(0) 编辑
  2015年8月26日
摘要: LIS nlogn模板http://acm.hdu.edu.cn/showproblem.php?pid=1950#include #include #include #include #include #include #define maxn 40000+10using namespace st... 阅读全文
posted @ 2015-08-26 20:45 Beserious 阅读(240) 评论(0) 推荐(0) 编辑
  2015年8月25日
摘要: C. Geometric Progressiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp loves geometric ... 阅读全文
posted @ 2015-08-25 16:18 Beserious 阅读(216) 评论(0) 推荐(0) 编辑
  2015年8月24日
摘要: E. Testtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSometimes it is hard to prepare tests for... 阅读全文
posted @ 2015-08-24 20:02 Beserious 阅读(192) 评论(0) 推荐(0) 编辑
摘要: D. Roads not only in Berlandtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBerland Government d... 阅读全文
posted @ 2015-08-24 19:58 Beserious 阅读(192) 评论(0) 推荐(0) 编辑
摘要: C. Roads in Berlandtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere arencities numbered fro... 阅读全文
posted @ 2015-08-24 19:53 Beserious 阅读(275) 评论(0) 推荐(0) 编辑