
字典树
1
__meteor
对于未来, 我只是一个孩子;
展开
-
CodeForces - 633C(字典树+dfs回溯)
C. Spy Syndrome 2time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter observing the results of Spy Syndrome, Yash realised the errors of his ways...原创 2018-04-06 13:03:13 · 365 阅读 · 0 评论 -
UVA - 11732 (左孩子右兄弟Tire)
#include<bits/stdc++.h> using namespace std; const int N=5005; const int INF=0x3f3f3f3f; typedef long long ll; int n, root, L; ll ans=0; char s[1005]; struct node{ char ch; int l, r; ...原创 2018-07-17 22:25:59 · 366 阅读 · 0 评论 -
HDU5536 01字典树求模板
#include<bits/stdc++.h> using namespace std; const int N=1e5+10; struct Tire{ int nxt[N][2], cnt[N], ed[N]; int L, root; void init(){ L=root=0; nxt[root][0]=nxt[root...原创 2018-10-01 19:52:25 · 207 阅读 · 0 评论