CodeForce 517 Div 2. C Cram Time】的更多相关文章

http://codeforces.com/contest/1072/problem/C C. Cram Time time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output In a galaxy far, far away Lesha the student has just got to know that he has an exa…
http://codeforces.com/contest/1072/problem/B B. Curiosity Has No Limits time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output When Masha came to math classes today, she saw two integer sequences…
https://codeforces.com/contest/1065 题意 给你a,b,让你找尽量多的自然数,使得他们的和<=a,<=b,用在a和b的自然数不能重复 思路 假如只有一个数a让你去找,问题就很简单了,就是找到一个x,使得x尽量大,且x*(x+1)/2<=a,意味着答案就是1~x 我的思路是从1开始累加,加到一个不能再加的数时,向后退一个数,加上n-sum(1~a[i-1])(ps:a[i+1]为不能再加的数) 错误贪心思想:假如加到不能再加,同样是只能再加一个数了,不如把…
Codeforces Round #517 (Div. 2, based on Technocup 2019 Elimination Round 2) #include <bits/stdc++.h> using namespace std; int n,m,k; ; int main() { cin>>n>>m>>k; ;i<=k-;++i) { sum+=(n+(m-))*-(i)*; } cout<<sum<<endl;…
C time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output After making bad dives into swimming pools, Wilbur wants to build a swimming pool in the shape of a rectangle in his backyard. He has set u…
C. Duff in the Army Recently Duff has been a soldier in the army. Malek is her commander. Their country, Andarz Gu has n cities (numbered from 1 to n) and n - 1 bidirectional roads. Each road connects two different cities. There exist a unique path b…
题目例如以下: B. Football Kit time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Consider a football tournament where n teams participate. Each team has two football kits: for home games, and for aw…
\(n\)天没更博了,因为被膜你赛的毒瘤题虐哭了... 既然打了这次CF还是纪念一下. 看看NOIP之前,接下来几场的时间都不好.这应该是最后一场CF了,差\(4\)分上紫也是一个遗憾吧. A 给一个矩形,每次从外面剥掉一圈,按剥去次序的奇偶分开,问最前\(k\)个奇数圈的总面积. 普及组题,直接模拟. #include<bits/stdc++.h> #define LL long long #define RG register #define R RG int using namespac…
A #include<queue> #include<cstdio> #include<cstring> #include<algorithm> #define rep(a,b,c) for(int a = b; a <= c;++ a) #define per(a,b,c) for(int a = b; a >= c; -- a) #define gc getchar() #define pc putchar inline int read()…
http://codeforces.com/contest/1072/problem/D bfs 走1步的最佳状态 -> 走2步的最佳状态 -> …… #include <bits/stdc++.h> using namespace std; #define ll long long #define minv 1e-6 #define inf 1e9 #define pi 3.1415926536 #define nl 2.7182818284 ; ; struct node {…