摘要: Trie的写法是很灵活的,感觉跟segment tree一样,要活用 1 /* 2 PROG: 统计难题 3 ID : ouyangyewei 4 LANG: C++ 5 */ 6 #include <string> 7 #include <cstdio> 8 #include <cstdlib> 9 #include <memory.h>10 #include <iostream>11 #include <algorithm>12 using namespace std;13 14 struct Trie_Node15 阅读全文
posted @ 2012-08-06 21:52 Maxwell:My Blog 阅读(332) 评论(0) 推荐(0) 编辑
摘要: View Code 1 /* 2 PROG: prefix 3 ID : ouyangyewei 4 LANG: C++ 5 */ 6 #include <string.h> 7 #include <cstdio> 8 #include <cstdlib> 9 #include <cstring> 10 #include <iostream> 11 #include <memory.h> 12 #include <algorithm> 13 using namespace std; 14 15 struct T 阅读全文
posted @ 2012-08-06 21:05 Maxwell:My Blog 阅读(385) 评论(0) 推荐(0) 编辑