2015年3月1日
摘要: 与上题不同的是: 在ans++; 后,要同时把j=0; 因为这道找出来的子序列不允许重叠,2个子序列要是重叠只能取其一嘛。 1 #include 2 #include 3 const int max=1000+10; 4 char p[max]; 5 char t[max]; 6 int f[m... 阅读全文
posted @ 2015-03-01 16:56 _fukua 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 const int maxm=1e4+5; 4 const int maxn=1e6+5; 5 char p[maxm]; 6 char t[maxn]; 7 int f[maxm]; 8 int ans; 9 void getfail()10 {1... 阅读全文
posted @ 2015-03-01 16:44 _fukua 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 水题 1 #include 2 #include 3 const int maxn=1e6+5; 4 const int maxm=1e4+5; 5 int p[maxm]; 6 int t[maxn]; 7 int f[maxm]; 8 int n,m; 9 void getfail()10 {1... 阅读全文
posted @ 2015-03-01 16:27 _fukua 阅读(194) 评论(0) 推荐(0) 编辑