摘要: 字典树……#include #include using namespace std;struct node{int son[26]; char hash[12];}trie[1000000];int cnt,n;char s[100000],s1[12],ans[12];void insert(char *s,char *s1){ for(int l=strlen(s),x=0,i=0;i'z'){ if(find(s1))printf("%s",ans); else printf("%s",s1); ... 阅读全文
posted @ 2014-02-19 20:23 forever97 阅读(183) 评论(0) 推荐(0) 编辑