D. Yet Another Monster Killing Problem You play a computer game. In this game, you lead a party of 𝑚 heroes, and you have to clear a dungeon ...
D. K Game time limit per test seconds memory limit per test megabytes inputstandard input outputstandard output Alice and Bob play a game. There is a paper strip which is divided into n cells numbered ...
2019-07-15 01:51 0 469 推荐指数:
D. Yet Another Monster Killing Problem You play a computer game. In this game, you lead a party of 𝑚 heroes, and you have to clear a dungeon ...
链接:https://codeforces.com/contest/1359 A. Berland Poker 题意: 现在有$n$张牌,$m$张王,共有$k$个人,每个人分得$\frac{k}{n}$张牌,你的得分是你手中王牌的个数减去其余人中拥有最多王牌的个数,求最大得分 思路 ...
本场链接:Educational Codeforces Round 114 (Rated for Div. 2) A. Regular Bracket Sequences 由于只需要构造 \(n\) 种,所以构造第 \(i\) 的时候可以让最左端的是一个长度为 \(i\) 的大括号,后面 ...
A - Two Rival Students 题意:共n个人排一排,两个人,位于a,b,相邻位置交换至多x次,最大化abs(a-b)的值。 题解:每次交换至多+1,不能超过n-1。 B - ...
题目链接:https://codeforces.com/contest/1469 A.Regular Bracket Sequence 题目大意:给你含有一个( 和一个 ),其他全是 ?的字符串,判断该字符串是否合法 题目思路:特判:①如果开头 )结尾( ,不合法②如果 ? 的个数是奇数 ...
Educational Codeforces Round 103 A. K-divisible Sum 题意 给定 n , k 构造出长度为 n 的正整数序列, 使得序列的和是 k 的倍数,求最大值的最小值 思路 当 \(n \le k\) 时候,答案是 \(\lceil \dfrac ...
A. Regular Bracket Sequences 思路: 枚举,我们让出现先连续左括号和出现右括号的数量一一对应,我们从连续出现n个左括号开始枚举,下一次枚举是先连续出现n-1个左括号,在 ...
传送门 视频题解 A. Shovels and Swords 贪心。每次尽可能取较多那一边即可。 写法上可以加速,\((2,1),(1,2)\)这种可以看作\((3,3)\),只取\((1,2)\ ...