Codeforces
文章平均质量分 86
叫兽的碳碳双键
这个作者很懒,什么都没留下…
展开
-
Mortal Kombat Tower (dp动态规划)
文章目录题意思路求解动态规划的四个步骤一、确定状态二、 状态转移方程三、初始条件和边界情况四、计算顺序AC代码:题意A和B两人玩通关游戏,每个关卡分为难(a[i]=1)和简单(a[i]=0),A可以通过任意难度的关卡,B只能通过难度为0的关卡,但是B在遇到难度为1的关卡的时候,可以选择跳跃一次,A和B轮流交替通关,每一轮两人最少可以通关一关,最多通关两关,B始终第一个开始,问:最终通关时,B进行跳跃的最少次数题目传传送门:点击进入思路由于是需要求一个最优解,同时这个最优解由AB两人的选择控制原创 2021-01-22 00:11:33 · 192 阅读 · 0 评论 -
Codeforces ---- Boring Apartments(水题)
题目来源:点击进入原题Desciptions:There is a building consisting of 10 00010 000 apartments numbered from 11 to 10 00010 000, inclusive.Call an apartment boring, if its number consists of the same digit. Examples of boring apartments are 11,2,777,999911,2,777,9999原创 2020-11-22 12:13:10 · 401 阅读 · 0 评论 -
Codeforces-1265A ----- Beautiful String
题目来源:CodeForces - 1265A 点击进入原题Description:A string is called beautiful if no two consecutive characters are equal. For example, “ababcb”, “a” and “abab” are beautiful strings, while “aaaaaa”, “abaa” and “bb” are not.Ahcl wants to construct a beautiful原创 2020-11-19 09:51:51 · 204 阅读 · 0 评论