![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Codeforces Round
Let力Go
为什么我眼里常含泪水,因为我有算法不会
展开
-
Codeforces Round #415 (Div. 2) A. Straight «A»
window.standaloneContest = false; function adjustViewport() { var screenWidthPx = Math.min((window).width(),window.screen.width);varsiteWidthPx=1100;//minwidthofsitevarratio=Math.mi原创 2017-05-22 20:53:08 · 292 阅读 · 0 评论 -
Codeforces Round #415 (Div. 2) B. Summer sell-off
B. Summer sell-offSummer holidays! Someone is going on trips, someone is visiting grandparents, but someone is trying to get a part-time job. This summer Noora decided that she wants to earn some mone原创 2017-05-22 21:06:54 · 390 阅读 · 0 评论 -
Codeforces Round #485 (Div. 2)E. Petr and Permutations
题意: 给定n,代表原排列为(1,2,3….n) 再给一个排列,问该排列是通过随机3n次交换(两个元素交换位置)还是7n+1次交换得到的。 思路: 1.全排列知识,排列发生一次元素交换,排列的奇偶性改变。 2.求给出排列的逆序数,可以得到该排列 奇偶性,逆序数为奇数即为奇排列,否则为偶排列。 3.因为3n、7n+1本身的奇偶性就不同,因此判断逆序数与3n、7n+1的奇偶性...原创 2018-05-31 22:16:40 · 168 阅读 · 0 评论 -
Codeforces Round #485 (Div. 2)D. Fair
Examples inputCopy 5 5 4 3 1 2 4 3 2 1 2 2 3 3 4 4 1 4 5 outputCopy 2 2 2 2 3 inputCopy 7 6 3 2 1 2 3 3 2 2 1 1 2 2 3 3 4 2 5 5 6 6 7 outputCopy 1 1 1 2 2 1 1 题意:n个城市,m条边(无向)...原创 2018-05-31 22:34:52 · 299 阅读 · 0 评论