摘要:全文检索Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1134Accepted Submission(s): 357Problem Description我们大家经常用google检索信息,但是检索信息的程序是很困难编写的;现在请你编写一个简单的全文检索程序。问题的描述是这样的:给定一个信息流文件,信息完全有数字组成,数字个数不超过60000个,但也不少于60个;再给定一个关键字集合,其中关键字个数不超过10000个,每个关键字的信息数字不超
阅读全文
摘要:Clairewd’s messageTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2929Accepted Submission(s): 1132Problem DescriptionClairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and she was preparing
阅读全文
摘要:Best RewardTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 500Accepted Submission(s): 201Problem DescriptionAfter an uphill battle, General Li won a great victory. Now the head of state decide to reward him with honor and treasures for his great ex
阅读全文
摘要:Simpsons’ Hidden TalentsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2456Accepted Submission(s): 929Problem DescriptionHomer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had.Marge: Yeah, what is it?Homer:
阅读全文
摘要:OulipoTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4064Accepted Submission(s): 1611Problem DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo gr
阅读全文
摘要:#include#include#include#include#include#includeusing namespace std;const int SIGMA_SIZE = 64;const int MAXNODE = 500; // 结点总数const int MAXS = 20 + 10; // 模板个数int idx[256], n;double prob[SIGMA_SIZE];struct AhoCorasickAutomata { int ch[MAXNODE][SIGMA_SIZE]; int f[MAXNODE]; // fail函数 int m...
阅读全文
摘要:#include#include#include#include#include#includeusing namespace std;const int SIGMA_SIZE = 26;const int MAXNODE = 11000;const int MAXS = 150 + 10;map ms;struct AhoCorasickAutomata{ int ch[MAXNODE][SIGMA_SIZE]; int f[MAXNODE]; // fail函数 int val[MAXNODE]; // 每个字符串的结尾结点都有一个非0的val int la...
阅读全文
摘要:题目大意:一个字符串,可以分解成若干英语单词的连接(单词可以重复使用),求有多少种方法?#include#include#include#includeusing namespace std;const int maxl=300005;const int maxwn=4005;const int maxwl=105;const int MOD=20071027;const int maxnode=400005;const int sigma_size=26;struct Trie{ int ch[maxnode][sigma_size]; int val[maxnode]; ...
阅读全文