2014年3月27日

hdu 3613 KMP算法扩展

摘要: 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 阅读全文

posted @ 2014-03-27 18:09 雄.. 阅读(381) 评论(0) 推荐(0)

HDU 2594 kmp算法变形

摘要: 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: 阅读全文

posted @ 2014-03-27 16:49 雄.. 阅读(212) 评论(0) 推荐(0)

hdu 1686 KMP算法

摘要: 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 阅读全文

posted @ 2014-03-27 15:47 雄.. 阅读(213) 评论(0) 推荐(0)

uva 11468 AC自动机+概率DP

摘要: #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... 阅读全文

posted @ 2014-03-27 14:45 雄.. 阅读(186) 评论(0) 推荐(0)

La 4670 AC自动机(模版)

摘要: #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... 阅读全文

posted @ 2014-03-27 14:04 雄.. 阅读(187) 评论(0) 推荐(0)

导航