随笔分类 -  字符串

摘要:A Hometask 题意:给你一个字符串,然后再给你k个禁止挨在一起的字符串,问你最少删除多少个字符串,使得不会有禁忌的字符串对挨在一起。题目保证每个字符最多出现在一个禁忌中。 题解:由于每个字符只会出现在一个禁忌里面,那么就说明每个询问是独立的。对于每个询问,我们贪心的去处理就好了,就连续的禁忌 阅读全文
posted @ 2017-05-02 17:39 qscqesze 阅读(392) 评论(0) 推荐(0) 编辑
摘要:Pattern 3 题目连接: https://www.hackerrank.com/contests/ieeextreme challenges/challenges/car spark Description Vangelis the bear received a digital signal 阅读全文
posted @ 2016-10-13 22:04 qscqesze 阅读(571) 评论(0) 推荐(0) 编辑
摘要:2040. Palindromes and Super Abilities 2 题目连接: http://acm.timus.ru/problem.aspx?space=1&num=2040 Description Dima adds letters s1, …, sn one by one to 阅读全文
posted @ 2016-08-05 19:07 qscqesze 阅读(403) 评论(0) 推荐(0) 编辑
摘要:Substring 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5769 Description ?? is practicing his program skill, and now he is given a string, he has to 阅读全文
posted @ 2016-07-28 18:54 qscqesze 阅读(638) 评论(0) 推荐(1) 编辑
摘要: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 阅读(821) 评论(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 阅读(460) 评论(0) 推荐(0) 编辑
摘要:E. Beautiful Subarrays 题目连接: http://www.codeforces.com/contest/665/problem/E Description One day, ZS the Coder wrote down an array of integers a with 阅读全文
posted @ 2016-04-21 22:17 qscqesze 阅读(606) 评论(0) 推荐(0) 编辑
摘要:4484: The Graver Robbers' Chronicles 题目连接: http://acm.scu.edu.cn/soj/problem.action?id=4484 Description One day, Kylin Zhang and Wu Xie are trapped in 阅读全文
posted @ 2016-04-18 10:31 qscqesze 阅读(484) 评论(0) 推荐(0) 编辑
摘要:4493: DNA 题目连接: http://acm.scu.edu.cn/soj/problem.action?id=4493 Description Deoxyribonucleic acid (DNA) is a molecule that carries most of the geneti 阅读全文
posted @ 2016-04-18 10:22 qscqesze 阅读(403) 评论(0) 推荐(0) 编辑
摘要:A. Train and Peter 题目连接: http://www.codeforces.com/contest/8/problem/A Description Peter likes to travel by train. He likes it so much that on the tra 阅读全文
posted @ 2016-04-11 22:02 qscqesze 阅读(469) 评论(0) 推荐(0) 编辑
摘要:D. Palindrome Degree 题目连接: http://www.codeforces.com/contest/7/problem/D Description String s of length n is called k palindrome, if it is a palindrom 阅读全文
posted @ 2016-04-07 20:00 qscqesze 阅读(758) 评论(0) 推荐(0) 编辑
摘要:C. Spy Syndrome 2 题目连接: http://www.codeforces.com/contest/633/problem/C Description After observing the results of Spy Syndrome, Yash realised the err 阅读全文
posted @ 2016-02-27 21:14 qscqesze 阅读(438) 评论(0) 推荐(0) 编辑
摘要:4032: [HEOI2015]最短不公共子串 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4032 Description 在虐各种最长公共子串、子序列的题虐的不耐烦了之后,你决定反其道而行之。 一个串的“子串”指的是它的连续的一段, 阅读全文
posted @ 2016-02-21 13:13 qscqesze 阅读(654) 评论(0) 推荐(1) 编辑
摘要:E. Wilbur and StringsTime Limit: 20 SecMemory Limit: 256 MB题目连接http://codeforces.com/contest/596/problem/EDescriptionWilbur the pig now wants to play ... 阅读全文
posted @ 2015-11-18 10:45 qscqesze 阅读(393) 评论(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 阅读(447) 评论(0) 推荐(0) 编辑
摘要:BazingaTime Limit: 20 SecMemory Limit: 256 MB题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5510DescriptionLadies and gentlemen, please sit up straight... 阅读全文
posted @ 2015-11-02 13:52 qscqesze 阅读(1049) 评论(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) 编辑
摘要:The Problem to Slow Down YouTime Limit: 1 Sec Memory Limit: 256 MB题目连接http://acm.hust.edu.cn/vjudge/contest/view.action?cid=93645#problem/GDescription... 阅读全文
posted @ 2015-10-04 16:06 qscqesze 阅读(432) 评论(0) 推荐(1) 编辑
摘要:E. Kefa and WatchTime Limit: 1 Sec Memory Limit: 256 MB题目连接http://codeforces.com/contest/580/problem/EDescriptionOne day Kefa the parrot was walking d... 阅读全文
posted @ 2015-09-23 12:26 qscqesze 阅读(558) 评论(0) 推荐(0) 编辑
摘要:Milk PatternsTime Limit: 20 SecMemory Limit: 256 MB题目连接http://poj.org/problem?id=3261DescriptionFarmer John has noticed that the quality of milk given... 阅读全文
posted @ 2015-08-10 21:20 qscqesze 阅读(494) 评论(0) 推荐(0) 编辑