随笔分类 -  字符串——Trie树

摘要:"ref" pkusc 快到了,做点 ~~thusc 的~~题涨涨 rp…… cpp include include include include using namespace std; typedef long long ll; int n, k, ch[6000005][10], cnt, 阅读全文
posted @ 2018-05-22 17:11 poorpool 阅读(132) 评论(0) 推荐(0)
摘要:可持久化trie。考场上我脑补了一个trie树合并也A了 cpp include include include using namespace std; int n, k, m, dfnl[100005], dfnr[100005], idx, rot[100005], v[100005], uu 阅读全文
posted @ 2018-05-06 21:29 poorpool 阅读(257) 评论(0) 推荐(0)
摘要:"ref" cpp include include include include include using namespace std; int n, tot, dfn[100005], s[100005][26], dep[100005], idx, siz[100005], ans; boo 阅读全文
posted @ 2018-05-01 20:46 poorpool 阅读(403) 评论(0) 推荐(0)
摘要:大傻逼trie树,更傻逼的是我这都没独立想出来,以后要少看题解,多多思考 阅读全文
posted @ 2018-04-26 21:33 poorpool 阅读(194) 评论(0) 推荐(0)
摘要:"……" cpp include include include include include using namespace std; typedef pair par; typedef long long ll; int s[510005][26], n, len, cnt, idx[5100 阅读全文
posted @ 2018-04-17 10:12 poorpool 阅读(183) 评论(0) 推荐(0)
摘要:找两个异或和最大的数 很容易想到trie树维护二进制 cpp include include include using namespace std; typedef long long ll; struct Node{ ll son[2], idd; bool hav[2]; Node(){ so 阅读全文
posted @ 2017-11-30 19:07 poorpool 阅读(103) 评论(0) 推荐(0)
摘要:模板题 cpp include include include using namespace std; struct Node{ int cnt, son[29]; bool hav; Node(){ cnt = hav = 0; } }trie[500005]; int c, n, m, len 阅读全文
posted @ 2017-11-29 20:14 poorpool 阅读(146) 评论(0) 推荐(0)