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