随笔分类 -  字符串 hash

摘要:A Hometask 题意:给你一个字符串,然后再给你k个禁止挨在一起的字符串,问你最少删除多少个字符串,使得不会有禁忌的字符串对挨在一起。题目保证每个字符最多出现在一个禁忌中。 题解:由于每个字符只会出现在一个禁忌里面,那么就说明每个询问是独立的。对于每个询问,我们贪心的去处理就好了,就连续的禁忌 阅读全文
posted @ 2017-05-02 17:39 qscqesze 阅读(389) 评论(0) 推荐(0) 编辑
摘要: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 阅读全文
posted @ 2016-07-16 23:51 qscqesze 阅读(759) 评论(0) 推荐(0) 编辑
摘要:D. DZY Loves Strings 题目连接: http://codeforces.com/contest/444/problem/D Description DZY loves strings, and he enjoys collecting them. In China, many pe 阅读全文
posted @ 2016-05-07 16:57 qscqesze 阅读(458) 评论(0) 推荐(0) 编辑
摘要:3555: [Ctsc2014]企鹅QQTime Limit: 20 SecMemory Limit: 256 MB题目连接http://www.lydsy.com/JudgeOnline/problem.php?id=3555DescriptionPenguinQQ是中国最大、最具影响力的SNS(... 阅读全文
posted @ 2015-11-04 18:15 qscqesze 阅读(360) 评论(0) 推荐(0) 编辑
摘要: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... 阅读全文
posted @ 2015-10-14 16:55 qscqesze 阅读(423) 评论(0) 推荐(0) 编辑
摘要:Music MessTime Limit: 20 SecMemory Limit: 256 MB题目连接http://codeforces.com/gym/100463/attachmentsDescriptionFrancis really likes his music. He especial... 阅读全文
posted @ 2015-07-21 21:12 qscqesze 阅读(322) 评论(0) 推荐(0) 编辑
摘要:Intelligent IMETime Limit: 20 SecMemory Limit: 256 MB题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4287DescriptionWe all use cell phone today. And we ... 阅读全文
posted @ 2015-07-20 18:37 qscqesze 阅读(348) 评论(0) 推荐(0) 编辑
摘要:C. Registration systemTime Limit: 20 SecMemory Limit: 256 MB题目连接http://codeforces.com/problemset/problem/4/CDescriptionA new e-mail service "Berlandes... 阅读全文
posted @ 2015-06-22 17:54 qscqesze 阅读(685) 评论(0) 推荐(0) 编辑
摘要:JudgingTime Limit: 20 SecMemory Limit: 256 MB题目连接http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=114147DescriptionThe NWERC organisers hav... 阅读全文
posted @ 2015-05-17 20:05 qscqesze 阅读(455) 评论(0) 推荐(0) 编辑