zrq495
www.zrq495.com
摘要: 简单trie树。代码如下: 1 #include<iostream> 2 #include<string.h> 3 #include<cstdio> 4 #include<cstdlib> 5 6 using namespace std; 7 8 int n; 9 10 typedef struct node 11 { 12 int flag; 13 node *next[26]; 14 }node; 15 16 void strlwr(char *s) //大写转换小写 17 { 18 int i; 19 for (i=0; i<s... 阅读全文
posted @ 2012-08-14 14:23 zrq495 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Trie树 + 暴力。代码如下: 1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<cstdlib> 5 6 using namespace std; 7 8 char s[50002][100]; 9 10 typedef struct node 11 { 12 int flag; 13 node *next[26]; 14 }node; 15 16 node *newnode() //新节点 17 { 18 int i; 19 node *... 阅读全文
posted @ 2012-08-14 14:20 zrq495 阅读(184) 评论(0) 推荐(0) 编辑