
codeforces
文章平均质量分 91
狗蛋儿l
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #771 (Div. 2)
A. ReverseYou are given a permutation p1,p2,…,pn of length n. You have to choose two integers l,r (1≤l≤r≤n) and reverse the subsegment [l,r] of the permutation. The permutation will become p1,p2,…,pl−1,pr,pr−1,…,pl,pr+1,pr+2,…,pn.Find the lexicographical原创 2022-02-15 09:34:50 · 837 阅读 · 1 评论 -
力扣leetcode第 280 场周赛
得到 0 的操作数给你两个 非负 整数 num1 和 num2 。每一步 操作 中,如果 num1 >= num2 ,你必须用 num1 减 num2 ;否则,你必须用 num2 减 num1 。例如,num1 = 5 且 num2 = 4 ,应该用 num1 减 num2 ,因此,得到 num1 = 1 和 num2 = 4 。然而,如果 num1 = 4且 num2 = 5 ,一步操作后,得到 num1 = 4 和 num2 = 1 。返回使 num1 = 0 或 num2 = 0 的 操原创 2022-02-13 16:15:22 · 7730 阅读 · 0 评论 -
Codeforces Global Round 19
A. Sorting PartsYou have an array a of length n. You can exactly once select an integer len between 1 and n−1 inclusively, and then sort in non-decreasing order the prefix of the array of length len and the suffix of the array of length n−lenFor example,原创 2022-02-13 12:34:14 · 769 阅读 · 0 评论 -
Codeforces Round #662 (Div. 2)题解
A. Rainbow Dash, Fluttershy and Chess Coloring time limit per test 1 second memory limit per test 256 megabytes input原创 2020-08-08 10:17:01 · 672 阅读 · 0 评论 -
Educational Codeforces Round 122 (Rated for Div. 2)
A. Div. 7题目:You are given an integer n. You have to change the minimum number of digits in it in such a way that the resulting number does not have any leading zeroes and is divisible by 7.If there are multiple ways to do it, print any of them. If the g原创 2022-02-02 19:29:30 · 745 阅读 · 0 评论