字典树
文章平均质量分 77
tyg_zx
这个作者很懒,什么都没留下…
展开
-
hdu1247
//字典树加暴力 //感觉自己的这个程序有点不太对劲,可是找不出来。但是居然A掉了。。。。。。。 #include #include #include #include #include using namespace std; const int maxnum=26; struct trie { bool flag; trie *next[maxnum]; }; tri原创 2015-01-19 01:46:29 · 631 阅读 · 0 评论 -
hdu1251
//在模板上稍微变下形就可以了 #include #include #include #include #include using namespace std; const int maxnum=26; struct trie { int flag; trie *next[maxnum]; }; trie *root; void init() { int i;原创 2015-01-19 13:27:01 · 598 阅读 · 0 评论 -
POJ2503(有delete函数)
//字典树的一个应用 #include #include #include #include #include #include using namespace std; const int maxnum=26; struct trie { bool flag; trie *next[maxnum]; char translation[30]; }; trie *roo原创 2015-01-24 14:10:49 · 499 阅读 · 0 评论 -
UVA3942(字典树加DP)
#include #include #include #include #include using namespace std; const int maxnum=27; const int mod=20071027; const int maxnode=500005; int dp[maxnode]; struct trie { int ch[maxnode][maxnum];原创 2015-01-24 22:58:26 · 618 阅读 · 0 评论