摘要:
字典树……#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); ... 阅读全文