随笔分类 - 字符串 hash
摘要:A Hometask 题意:给你一个字符串,然后再给你k个禁止挨在一起的字符串,问你最少删除多少个字符串,使得不会有禁忌的字符串对挨在一起。题目保证每个字符最多出现在一个禁忌中。 题解:由于每个字符只会出现在一个禁忌里面,那么就说明每个询问是独立的。对于每个询问,我们贪心的去处理就好了,就连续的禁忌
阅读全文
摘要:The Big Painting 题目连接: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=122283 problem/J Description Samuel W. E. R. Craft is an artist with a gr
阅读全文
摘要:D. DZY Loves Strings 题目连接: http://codeforces.com/contest/444/problem/D Description DZY loves strings, and he enjoys collecting them. In China, many pe
阅读全文
摘要:3555: [Ctsc2014]企鹅QQTime Limit: 20 SecMemory Limit: 256 MB题目连接http://www.lydsy.com/JudgeOnline/problem.php?id=3555DescriptionPenguinQQ是中国最大、最具影响力的SNS(...
阅读全文
摘要:StringTime Limit: 1 Sec Memory Limit: 256 MB题目连接http://acm.hust.edu.cn/vjudge/contest/view.action?cid=95149#problem/IDescriptionGiven a string S and t...
阅读全文
摘要:Music MessTime Limit: 20 SecMemory Limit: 256 MB题目连接http://codeforces.com/gym/100463/attachmentsDescriptionFrancis really likes his music. He especial...
阅读全文
摘要:Intelligent IMETime Limit: 20 SecMemory Limit: 256 MB题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4287DescriptionWe all use cell phone today. And we ...
阅读全文
摘要:C. Registration systemTime Limit: 20 SecMemory Limit: 256 MB题目连接http://codeforces.com/problemset/problem/4/CDescriptionA new e-mail service "Berlandes...
阅读全文
摘要:JudgingTime Limit: 20 SecMemory Limit: 256 MB题目连接http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=114147DescriptionThe NWERC organisers hav...
阅读全文