该题 必须使用字典树(Trie Tree) 和 并查集(Disjointset) 和 欧拉通路 、 回路的相关知识来解答。】
不懂的同学先看下面的链接, 介绍了字典树、并查集、和欧拉通路回路 的 相关知识, 以及 代码模板。
字典树:http://blog.csdn.net/hongxdong/archive/2010/03/24/5413139.aspx
并查集:http://blog.csdn.net/hongxdong/archive/2010/03/24/5413445.aspx
欧拉通路回路:http://blog.csdn.net/hongxdong/archive/2010/03/24/5413711.aspx
我在想这题不用字典树, 用map<string , int> 代替字典树, 能不能通过啊? 试试。。。经过测试使用map 直接超时。