A - Beginning 这个年份恐怕需要+2 #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define mp make_pair #define pb push_back #define space putchar(' ') #define enter putchar('\n') #define MAXN 80005 #define eps 1e-1…
本来以为是1199rated的..仔细一看发现是1999,所以就做了一下 这场涨分很轻松啊...为啥又没打 等pkuwc考完我一定打一场atcoder(咕咕咕,咕咕咕,咕咕咕咕咕咕咕~) 但是其实我思维速度上真的有点不行... A - Bulletin Board 输出\((N - W + 1)(N - H + 1)\) #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int…
A - Anti-Adjacency K <= (N + 1) / 2 #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define mp make_pair #define pb push_back #define space putchar(' ') #define enter putchar('\n') #define MAXN 40005 #d…
Tenka1 Programmer Contest 2019 C - Stones 题面大意:有一个01序列,改变一个位置上的值花费1,问变成没有0在1右边的序列花费最少多少 直接枚举前i个都变成0即可 #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define mp make_pair #define pb push_back #define space…
M-SOLUTIONS Programming Contest A - Sum of Interior Angles #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define mp make_pair #define pb push_back #define space putchar(' ') #define enter putchar('\n') #…
A - Thumbnail 题意简述:给出N个数,找出N个数中和这N个数平均值绝对值最小的数 根据题意写代码即可= = #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define pdi pair<db,int> #define mp make_pair #define pb push_back #define enter putchar('\…
A:签到. #include<iostream> #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<algorithm> using namespace std; #define ll long long ?n:gcd(m,n%m);} int read() { ,f=;char c=getchar(); ;c=getchar()…
A - Beginning 签到. #include <bits/stdc++.h> using namespace std; int main() { ]; while (scanf("%d", a) != EOF) { ; i < ; ++i) scanf("%d", a + i); sort(a, a + ); ; ; i < ; ++i) res = res * + a[i]; puts(res == ? "YES"…
Mujin Programming Challenge 2017 A - Robot Racing 如果每个数都是一个一个间隔开的,那么答案是\(n!\) 考虑把一个数挪到1,第二个数挪到3,以此类推,如果不行,证明前面中有个数肯定会被选择,所以任意选一个数到终点,继续这样的操作 最后剩下的乘一个阶乘即可 #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #de…
C - 4/N 列出个方程枚举解一下 #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define mp make_pair #define pb push_back #define space putchar(' ') #define enter putchar('\n') #define MAXN 4005 #define eps 1e-10 //#de…