Trie - 字典树 模板
#define sigma_size 26
struct Trie{
int ch[maxnode][sigma_size];//节点i的编号为j的子节点编号。
int val[maxnode];//每个字符串的权值
int sz;//节点总数
Trie(){sz = 1;memset(ch[0],0,sizeof(ch[0]));}//初始化
int idx(char c){
return c - 'a';}//c编号