上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 36 下一页
摘要: 学习位运算 cpp include include using namespace std; int n, m, dp[15][4105], a[15], uu, ans; const int mod=100000000; int main(){ cin m n; for(int i=1; i 阅读全文
posted @ 2018-01-12 19:23 poorpool 阅读(137) 评论(0) 推荐(0)
摘要: 对于每个点,把它拆成有权值为1的边相连的两个点,原边是inf。 边的起点统一加n,ss也加n 这就成了最小割 cpp include include include include using namespace std; int n, m, ss, tt, hea[205], cnt, uu, v 阅读全文
posted @ 2018-01-11 22:00 poorpool 阅读(126) 评论(0) 推荐(0)
摘要: 先差分一下,钦定一个模式串,答案是这个模式串的所有后缀与其它串的最小的相同的的最大的。 cpp include include include using namespace std; int n, a[1005][1005], len[1005], nxt[1005], ans=0; void g 阅读全文
posted @ 2018-01-11 19:03 poorpool 阅读(107) 评论(2) 推荐(0)
摘要: 不相同子串个数。 参考那篇论文。 cpp include include include using namespace std; int n, m, p, x[1005], y[1005], c[1005], sa[1005], rnk[1005], hei[1005]; int ans, T; 阅读全文
posted @ 2018-01-11 09:07 poorpool 阅读(114) 评论(0) 推荐(0)
摘要: 参考那篇经典论文。 cpp include include include using namespace std; int n, k, r[20005], x[20005], y[20005], sa[20005], rank[20005], hei[20005]; int m=1000005, 阅读全文
posted @ 2018-01-10 20:56 poorpool 阅读(129) 评论(0) 推荐(0)
摘要: ```cpp include include include include using namespace std; int T, n, m, p, len, r[20005], c[20005], x[20005], y[20005], sa[20005]; int rank[20005], a 阅读全文
posted @ 2018-01-10 08:42 poorpool 阅读(103) 评论(0) 推荐(0)
摘要: "ref" and 挑战程序设计竞赛。 ~~主要是发现自己以前写得代码太难看而且忘光了,而且我字符串死活学不会啊,kmp这种东西我都觉得是省选+难度啊QAQ~~ cpp include include include using namespace std; int n, cnt[1000005], 阅读全文
posted @ 2018-01-09 16:55 poorpool 阅读(200) 评论(5) 推荐(0)
摘要: ```cpp #include #include #include #include using namespace std; int n, m, uu, vv, dy[100005]; double dp[100015]; int main(){ while(scanf("%d %d", &n, &m)!=EOF){ if(!n && !m) break; memset(dp,... 阅读全文
posted @ 2018-01-07 21:40 poorpool 阅读(115) 评论(0) 推荐(0)
摘要: 讲解看 "这里" 交 C++ 阅读全文
posted @ 2018-01-07 21:17 poorpool 阅读(107) 评论(0) 推荐(0)
摘要: ```cpp include include include include using namespace std; int n, m, uu, vv, ww, a[105], cnt, hea[10005], gra[10005], siz[10005]; int tot, sze, rot; 阅读全文
posted @ 2018-01-07 20:04 poorpool 阅读(163) 评论(0) 推荐(0)
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 36 下一页