codeforces
文章平均质量分 50
140625730
这个作者很懒,什么都没留下…
展开
-
Educational Codeforces Round 111 EditorialA-C题解
Educational Codeforces Round 111 Editorial1550A - Find The Array思路:取n个数和最大情况为1,3,5,…,和为n²,那么对于(n-1)²-n²的数x,前n-1个取最大,最后一个取x-(n-1)²,实际上会发现最后一个数是在前面的范围内+1或者+2得到也就是说合法的,故只要判断哪个n²比和大就行了代码#include <bits/stdc++.h>#define maxn 105using namespace std;i原创 2021-07-16 20:12:45 · 233 阅读 · 0 评论 -
Codeforces Round #714(Div.2)A-C
Codeforces Round #714(Div.2)A-C补题A. Array and PeaksA sequence of n integers is called a permutation if it contains all integers from 1 to n exactly once.Given two integers n and k, construct a permutation a of numbers from 1 to n which has exactly k pea原创 2021-04-12 14:07:06 · 609 阅读 · 0 评论 -
2021-03-14
Codeforces Round #707 Div.2补题A.Alexey and Train这题就从前往后模拟就行了#include <cstdio>#include <iostream>#include <cstring>#include <vector>#include <algorithm>#include <iomanip>using namespace std;int a[105],b[105],tme[原创 2021-03-14 13:58:00 · 123 阅读 · 0 评论