1 #include <cstdio> 2 #include <cstring> 3 #include <cstdlib> 4 #include <algorithm> 5 #include <iostream> 6 7 using namespace std; 8 9 struct N 10 { 11 char data; 12 N *l,*r; 13 }; 14 15 N *creat() 16 { 17 N *p = (N *)malloc(sizeof(N)); 18 p->l = p->r = NULL; 19 return p; 20 } 21 22 int site = 0; 23 24 bool insert(N *root,char *s) 25 { 26 if(s[site] == '