Codeforces Round #603 (Div. 2)E】的更多相关文章

Codeforces Round #603 (Div. 2) A. Sweet Problem A. Sweet Problem time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have three piles of candies: red, green and blue candies: the first pile…
E. Editor The development of a text editor is a hard problem. You need to implement an extra module for brackets coloring in text. Your editor consists of a line with infinite length and cursor, which points to the current character. Please note that…
链接: https://codeforces.com/contest/1263/problem/E 题意: The development of a text editor is a hard problem. You need to implement an extra module for brackets coloring in text. Your editor consists of a line with infinite length and cursor, which point…
D. Secret Passwords One unknown hacker wants to get the admin's password of AtForces testing system, to get problems from the next contest. To achieve that, he sneaked into the administrator's office and stole a piece of paper with a list of n passwo…
链接: https://codeforces.com/contest/1263/problem/D 题意: One unknown hacker wants to get the admin's password of AtForces testing system, to get problems from the next contest. To achieve that, he sneaked into the administrator's office and stole a piec…
链接: https://codeforces.com/contest/1263/problem/C 题意: On the well-known testing system MathForces, a draw of n rating units is arranged. The rating will be distributed according to the following algorithm: if k participants take part in this event, t…
链接: https://codeforces.com/contest/1263/problem/B 题意: A PIN code is a string that consists of exactly 4 digits. Examples of possible PIN codes: 7013, 0000 and 0990. Please note that the PIN code can begin with any digit, even with 0. Polycarp has n (…
链接: https://codeforces.com/contest/1263/problem/A 题意: You have three piles of candies: red, green and blue candies: the first pile contains only red candies and there are r candies in it, the second pile contains only green candies and there are g ca…
F. Economic Difficulties 题目链接: https://codeforces.com/contest/1263/problem/F 题目大意: 两棵树,都有n个叶子节点,一棵树正着放,一棵树倒着放,叶子节点从左到右对应装置1,2,3,4...n,问最多能删掉多少条边,使得装置能与两棵树任意一个根节点1相连. 解题思路: mp[ i ][ j ]是装置 i 到 j 这段区间删除这段连续区间所能删除的最大边数,两个图分开看,算出每一个图中如果不连通这段区间对应的叶子节点所能删除…
E. Editor 题目链接: https://codeforces.com/contest/1263/problem/E 题目大意: 输入一个字符串S1含有‘(’ , ‘)’ , ‘R’ , ‘L’ 以及其他字符.根据这个字符串,得到相应的字符串S2.起始idx=1即S2的初始坐标,然后从左到右读取S1,当遇到'L',idx减小1(当无法左移的情况下idx不减小),当遇到'R',idx增加1,当读取到其他字符时,将idx这个位置上的字符更新为读取到的新的字符.然后输出每一步得到的字符串S2最大…