package main import ( "fmt" ) type Trie struct { son [26]*Trie cnt int } func (t *Trie) Insert(s string) { node := t for i := range s { c := int(s[i] - 'a') if node.son[c] == nil { node.son[c] = &Trie{} } node.son[c].cnt++ ...