#include
#include
#include
#include
#include
#include
#include
#include
#include
#include using namespace std;
#def...
分类:
其他好文 时间:
2015-07-31 21:53:47
阅读次数:
101
http://acm.hdu.edu.cn/showproblem.php?pid=1075#include#include#include#include#include#includeusing namespace std;struct node{ int flag; char str[15];...
分类:
其他好文 时间:
2015-07-31 19:56:46
阅读次数:
120
题目链接:Keywords Search
解析:直接开个end数组,统计一下即可。
AC代码:
#include
using namespace std;
const int max_word = 500005;
const int sigma_size = 26;
const int max_text = 1000005;
struct Trie{
...
分类:
其他好文 时间:
2015-07-31 16:14:20
阅读次数:
122
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include using namespace std;
#def...
分类:
其他好文 时间:
2015-07-31 16:14:02
阅读次数:
106
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1251node *head=(node*)malloc(sizeof(node));for(int i=0; inext[i] = NULL; head->sum = 0;}可以改成node *hea.....
分类:
其他好文 时间:
2015-07-31 10:13:26
阅读次数:
117
http://acm.hdu.edu.cn/showproblem.php?pid=1251#include#include#includeusing namespace std;struct node{ int sum; node *next[26];};void buildtriet...
分类:
其他好文 时间:
2015-07-31 09:02:37
阅读次数:
117
Colored Sticks
Time Limit: 5000MS
Memory Limit: 128000K
Total Submissions: 32351
Accepted: 8536
Description
You are given a bunch of wooden sticks. Each endpoint of...
分类:
其他好文 时间:
2015-07-30 23:27:19
阅读次数:
231
要注意二点 。这组数据16shehehesayshrheryasherhs出现重复的,也要算。所以这里答案为4;这一组16shehehesayshrheryasherhe查询单词中he出现过,所以后面的he不能记录,所以答案为4;#include#include#includestruct trie...
分类:
其他好文 时间:
2015-07-30 23:17:41
阅读次数:
139
BZOJ 2251 [2010Beijing Wc]外星联络 trie的性质以及字符串性质...
分类:
其他好文 时间:
2015-07-30 21:27:05
阅读次数:
131