随笔分类 -  ACM-DP

摘要:给定两个单词 word1 和 word2,计算出将 word1 转换成 word2 所使用的最少操作数 。 你可以对一个单词进行如下三种操作: 插入一个字符删除一个字符替换一个字符示例 1: 输入: word1 = "horse", word2 = "ros"输出: 3解释: horse -> ro 阅读全文
posted @ 2020-02-25 22:53 StarHai 阅读(965) 评论(0) 推荐(0)
摘要:Invoker Time Limit: 15000/12000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 117 Accepted Submission(s): 35 Proble 阅读全文
posted @ 2019-09-28 20:08 StarHai 阅读(648) 评论(0) 推荐(0)
摘要:1270: [BeijingWc2008]雷涛的小猫 Description 雷涛的小猫雷涛同学非常的有爱心,在他的宿舍里,养着一只因为受伤被救助的小猫(当然,这样的行为是违反学 生宿舍管理条例的)。 在他的照顾下,小猫很快恢复了健康,并且愈发的活泼可爱了。可是有一天,雷涛下课回 到寝室,却发现小猫 阅读全文
posted @ 2018-12-04 21:36 StarHai 阅读(277) 评论(0) 推荐(0)
摘要:3107: [cqoi2013]二进制a+b Description 输入三个整数a, b, c,把它们写成无前导0的二进制整数。比如a=7, b=6, c=9,写成二进制为a=111, b=110, c=1001。接下来以位数最多的为基准,其他整数在前面添加前导0,使得a, b, c拥有相同的位数 阅读全文
posted @ 2018-11-09 22:01 StarHai 阅读(394) 评论(0) 推荐(0)
摘要:Description 一个n*n(n>=2)棋盘上有黑白棋子各一枚。游戏者A和B轮流移动棋子,A先走。 l A的移动规则:只能移动白棋子。可以往上下左右四个方向之一移动一格。 l B的移动规则:只能移动黑棋子。可以往上下左右四个方向之一移动一格或者两格。 和通常的“吃子”规则一样,当某游戏者把自己 阅读全文
posted @ 2018-11-07 23:00 StarHai 阅读(362) 评论(0) 推荐(0)
摘要:Happy Matt Friends Time Limit: 6000/6000 MS (Java/Others) Memory Limit: 510000/510000 K (Java/Others)Total Submission(s): 5248 Accepted Submission(s): 阅读全文
posted @ 2018-09-26 22:53 StarHai 阅读(297) 评论(0) 推荐(0)
摘要:After eating food from Chernobyl, DRD got a super power: he could clone himself right now! He used this power for several times. He found out that thi 阅读全文
posted @ 2018-09-15 19:38 StarHai 阅读(217) 评论(0) 推荐(0)
摘要:A prince of the Science Continent was imprisoned in a castle because of his contempt for mathematics when he was young, and was entangled in some math 阅读全文
posted @ 2018-09-15 19:13 StarHai 阅读(619) 评论(0) 推荐(0)
摘要:A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, ..., xm > another 阅读全文
posted @ 2018-08-02 20:49 StarHai 阅读(362) 评论(0) 推荐(0)
摘要:This is yet another problem dealing with regular bracket sequences. We should remind you that a bracket sequence is called regular, if by inserting «+ 阅读全文
posted @ 2018-08-02 20:42 StarHai 阅读(303) 评论(0) 推荐(0)
摘要:'Oh no, they've done it again', cries the chief designer at the Waferland chip factory. Once more the routing designers have screwed up completely, ma 阅读全文
posted @ 2018-08-02 20:29 StarHai 阅读(226) 评论(0) 推荐(0)
摘要:Disky and Sooma, two of the biggest mega minds of Bangladesh went to a far country. They ate, coded and wandered around, even in their holidays. They 阅读全文
posted @ 2018-08-02 19:04 StarHai 阅读(194) 评论(0) 推荐(0)
摘要:链接:http://acm.hdu.edu.cn/showproblem.php?pid=6331 Walking Plan Problem Description There are n intersections in Bytetown, connected with m one way str 阅读全文
posted @ 2018-07-31 22:06 StarHai 阅读(317) 评论(0) 推荐(0)
摘要:Since 1945, when the first nuclear bomb was exploded by the Manhattan Project team in the US, the number of nuclear weapons have soar... 阅读全文
posted @ 2018-07-29 19:56 StarHai 阅读(230) 评论(0) 推荐(0)
摘要:Liyuan wanted to rewrite the famous book “Journey to the West” (“Xi You Ji” in Chinese pinyin). In the original book, the Monkey King ... 阅读全文
posted @ 2018-07-29 19:55 StarHai 阅读(269) 评论(0) 推荐(0)
摘要:Giving two strings and you should judge if they are matched. The first string contains lowercase letters and uppercase letters. The se... 阅读全文
posted @ 2018-07-24 00:20 StarHai 阅读(223) 评论(0) 推荐(0)
摘要:F. Cards and Joytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn pla... 阅读全文
posted @ 2018-06-28 19:22 StarHai 阅读(344) 评论(0) 推荐(0)
摘要:Corn FieldsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 16473 Accepted: 8678DescriptionFarmer John has purchased a lush n... 阅读全文
posted @ 2018-06-18 21:07 StarHai 阅读(153) 评论(0) 推荐(0)
摘要:Neal is very curious about combinatorial problems, and now here comes a problem about words. Knowingthat Ray has a photographic memory... 阅读全文
posted @ 2018-04-13 23:15 StarHai 阅读(216) 评论(0) 推荐(0)
摘要:Problem DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income... 阅读全文
posted @ 2018-03-23 22:08 StarHai 阅读(386) 评论(0) 推荐(0)