Clairewd’s message Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2929 Accepted Submission(s): 1132 Problem Description Clairewd is a member of FBI. After several years concealing in BUPT, s…
题意: 求模板在匹配串所有子串中出现次数. SOL: 本题与普通kmp有一点不同,因为待匹配串中的模板串可能相互包含. 我们考虑正常的kmp是在怎么做的 i = 1 2 3 4 5 6 7 8 9 …… A = a b a b a b a a b a b … B = a b a b a c b j = 1 2 3 4 5 6 7 i=j=6时两个字符串不同了,那么j要减小到上一个匹配的地方. 当匹配完了呢? 比如 i = 1 2 3 4 5 6 A= a z a z a…
Best Reward Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 500 Accepted Submission(s): 201 Problem Description After an uphill battle, General Li won a great victory. Now the head of state d…
Simpsons’ Hidden Talents Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2456 Accepted Submission(s): 929 Problem Description Homer: Marge, I just figured out a way to discover some of the ta…