
暴力
免费的单身汉RainsdRop
这个作者很懒,什么都没留下…
展开
-
CodeForces - 975B:Mancala(暴力)
链接:https://vjudge.net/problem/CodeForces-975B题目Mancala is a game famous in the Middle East. It is played on a board that consists of 14 holes.Initially, each hole has ai stones. When a player makes a move, he chooses a hole which contains a positive nu原创 2020-12-10 22:03:20 · 263 阅读 · 0 评论 -
CodeForces - 961A:Tetris(水题+暴力)
链接:https://vjudge.net/problem/CodeForces-961A题意类似于俄罗斯方块,一共有n列轨道(我也不知道叫啥了,先这样吧),一共会落下m个方块。当有一层全都有方块时,这一层会消失并且你会得1分(俄罗斯方块)。输出得分。思路巨水的一题,可惜我走了弯路。不过只要思想不滑坡,方法总比困难多。开一个数组,记录每个数字的出现次数(反正范围小)。然后输出出现最少的次数就完事了。(一开始我竟然还想着用字符串数组存,然后看哪个短,真的是蠢(~ ̄(OO) ̄)ブ)水水水,上代原创 2020-11-21 22:14:49 · 560 阅读 · 0 评论 -
CodeForces - 946C:String Transformation(暴力)
题目You are given a string s consisting of |s| small english letters.In one move you can replace any character of this string to the next character in alphabetical order (a will be replaced with b, s will be replaced with t, etc.). You cannot replace lette原创 2020-11-16 22:44:39 · 232 阅读 · 0 评论 -
牛客练习_20859:兔子的名字(字符串+暴力)
链接:https://ac.nowcoder.com/acm/problem/20859题目兔子发现序列的名字都是数字,实在太无聊了,于是兔子开始研究兔子的名字。现在兔子手上有 n 个名字 Ti 和 m 个可爱词汇Sj,兔子对每一个名字 Ti 定义了一个可爱度,如果 Ti 中出现了一个可爱的单词 Sj,那么 Ti 就有 1 点可爱值,最后的总可爱值就是 Ti 的可爱度,这里的出现指 Sj 是 Ti 的子序列。例如 abc 是 aebdc 的子序列,abc 也是 abcd 的子序列。现在兔子想知道每原创 2020-11-10 23:00:06 · 249 阅读 · 0 评论