摘要:
字典树 字典树比较普通字符串比较而言,字符的可操作性更强 const int maxn=5e5+5; //maxn为总结点个数,不是总深度 struct trie{ int nex[maxn][26],cnt=0; bool exist[maxn]; void insert(string s){ i 阅读全文
posted @ 2020-07-21 11:45
caoanda
阅读(122)
评论(0)
推荐(0)
摘要:
于是他错误的点名开始了 直接用字典树维护即可,不过这个题其实直接用map也能过… 字典树: // Created by CAD #include <bits/stdc++.h> using namespace std; const int maxn=5e5+5; struct trie{ int n 阅读全文
posted @ 2020-07-21 09:34
caoanda
阅读(117)
评论(0)
推荐(0)

浙公网安备 33010602011771号