文章分类 -  acm字符串-trie

hdu2846(2009多校第四场) 字典树
摘要:明明就是个简单的字典树,我不过就是想复习一下尼玛被自己坑死了T^T把字符串分解那儿写错了,检查了半天没找到错误,然后以为被卡数组内存,难过的学习字典树的指针写法。。发现还是不对,大半夜突然看到自己傻乎乎的错误顿时感觉好傻逼啊啊啊!!字典树数组写法: 1 #include 2 #include 3 i... 阅读全文

posted @ 2014-12-16 03:11 xiao_xin 阅读(134) 评论(0) 推荐(0)

hdu1671 字典树
摘要:1 #include 2 #include 3 int sz,ch[100005][30],val[100005]; 4 void insert(char *s) 5 { 6 int u=0,i,len=strlen(s); 7 for (i=0;i<len;i++) 8 ... 阅读全文

posted @ 2014-07-16 17:53 xiao_xin 阅读(85) 评论(0) 推荐(0)

hdu1247 字典树
摘要:1 #include 2 #include 3 int ch[50005][100],sz=1,val[50005]; 4 char s[50005][105]; 5 void insert(char *s) 6 { 7 int i,u=0,len=strlen(s),c; 8 ... 阅读全文

posted @ 2014-07-16 17:52 xiao_xin 阅读(84) 评论(0) 推荐(0)

hdu1251 字典树
摘要:1 #include 2 #include 3 int sz=1,father[1000005],val[1000005],ch[1000005][30]; 4 void insert(char *s) 5 { 6 int u=0,i,len=strlen(s); 7 for (i... 阅读全文

posted @ 2014-07-16 16:27 xiao_xin 阅读(87) 评论(0) 推荐(0)

导航