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…
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…
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;…
CF-1027-B. Curiosity Has No Limits http://codeforces.com/contest/1072/problem/B 题意: 给定两组序列a,b,长度为n-1.求数列t使得 a[i] = t[i]|t[i+1] b[i] = t[i]&t[i+1] 其中( \(0\le a[i]\le3\) , \(0 \le b[i] \le 3\) ) 分析: 刚看到这个题,感觉是dp,然后觉得范围只有0~3,可以分情况讨论,奈何写不出来转移方程于是dfs.然而写d…
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 {…