上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 20 下一页
  2012年8月6日
摘要: 1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #define MAXN 15000 5 #define MAXM 510 6 using namespace std; 7 int size, K[5], dp[MAXN][MAXM]; 8 bool vis[MAXN]; 9 char str[MAXM]; 10 struct Trie { 11 int cnt, fail, next[4]; 12 void Init() { 13 cnt = fail = 0; 14 ... 阅读全文
posted @ 2012-08-06 22:48 DrunBee 阅读(446) 评论(0) 推荐(0) 编辑
  2012年8月5日
摘要: 1 #include<iostream> 2 #include<string> 3 #include<queue> 4 #include<cstdio> 5 #include<cstring> 6 #define MAXM 26 7 #define MAXN 1010 8 #define INF 123456789 9 using namespace std; 10 char str[MAXN][MAXM]; 11 string path[MAXM << 1][MAXN]; 12 int size, dp[MAXM < 阅读全文
posted @ 2012-08-05 17:43 DrunBee 阅读(511) 评论(0) 推荐(0) 编辑
摘要: 1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #include<algorithm> 5 #define MAXN 1010 6 #define INF 123456789 7 using namespace std; 8 struct Trie { 9 int fail, next[4]; 10 bool end; 11 void Init() { 12 end = false; 13 fail = 0; 14 memset(ne... 阅读全文
posted @ 2012-08-05 13:46 DrunBee 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #define MAXM 256 5 #define MAXN 550 6 using namespace std; 7 struct Trie { 8 bool end; 9 int fail, next[MAXM]; 10 void Init() { 11 end = false; 12 fail = 0; 13 memset(next, 0, sizeof(next)); 14 ... 阅读全文
posted @ 2012-08-05 12:37 DrunBee 阅读(426) 评论(0) 推荐(0) 编辑
  2012年8月4日
摘要: 1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #define MAXN 110 5 #define MAXM 26 6 #define MAXL (1<<10) 7 #define MOD 20090717 8 using namespace std; 9 char str[MAXN]; 10 int size, digit[MAXL], dp[30][MAXN][MAXL]; 11 struct node { 12 int fail, end, next[MAXM]; 13 阅读全文
posted @ 2012-08-04 11:23 DrunBee 阅读(460) 评论(0) 推荐(0) 编辑
摘要: 1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #define MAXN 26 5 #define MOD 10330176681277348905LL 6 typedef unsigned long long LL; 7 using namespace std; 8 char str[MAXN]; 9 int size; 10 LL total, ans; 11 struct node { 12 int fail, next[MAXN]; 13 bool end; 14 void... 阅读全文
posted @ 2012-08-04 10:12 DrunBee 阅读(682) 评论(0) 推荐(1) 编辑
摘要: 1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 typedef long long LL; 5 #define MAXN 110 6 #define MOD 100000 7 using namespace std; 8 char str[MAXN]; 9 int size; 10 struct Matrix { 11 LL mat[MAXN][MAXN]; 12 void Zero() { 13 memset(mat, 0, sizeof(mat)); 14 } ... 阅读全文
posted @ 2012-08-04 00:48 DrunBee 阅读(493) 评论(0) 推荐(1) 编辑
  2012年8月3日
摘要: 1 #include<cstdio> 2 #include<cstring> 3 #include<vector> 4 #include<queue> 5 #define MAXL 256 6 #define MAXN 50010 7 using namespace std; 8 char str[MAXN]; 9 int dg[MAXN], code[MAXN], size; 10 bool vis[MAXN]; 11 struct node { 12 int fail, cnt, next[MAXL]; 13 void Init() { 14 阅读全文
posted @ 2012-08-03 22:23 DrunBee 阅读(684) 评论(0) 推荐(0) 编辑
  2012年8月1日
摘要: 1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #define MAXN 2000010 5 #define MAXM 50000 6 #define MAXL 128 7 using namespace std; 8 char str[MAXN], dic[MAXM][60]; 9 int size, cnt[MAXM];10 struct node {11 int pos, fail, next[MAXL];12 void Init() {13 pos = fail = 0;14 .. 阅读全文
posted @ 2012-08-01 22:40 DrunBee 阅读(946) 评论(0) 推荐(0) 编辑
摘要: 1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #define MAXN 100010 5 #define MAXL 510 6 #define MAXM 128 7 using namespace std; 8 char str[MAXN]; 9 int size;10 bool vis[MAXL], flag;11 struct node {12 int pos, fail, next[MAXM];13 void Init() {14 pos = fail = 0;15 ... 阅读全文
posted @ 2012-08-01 21:53 DrunBee 阅读(564) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 20 下一页