摘要: 欧拉回路+并查集(判断图的联通)+Tire树(快速查找字符串,并且记录相应点的度数)Tire树相关知识http://zh.wikipedia.org/wiki/Trie#include <iostream> using namespace std; const int maxc = 26; const int maxn = 500001; struct TrieNode { int key; TrieNode * child[maxc]; TrieNode() { key=-1; memset(child,0,sizeof(child)); } }; int count[ma... 阅读全文
posted @ 2012-10-12 19:47 lishimin_come 阅读(103) 评论(0) 推荐(0) 编辑