题目链接:http://codeforces.com/contest/845 A. Chess Tourney 水题,排序之后判断第n个元素和n+1个元素是不是想等就可以了. #include <bits/stdc++.h> using namespace std; int a[210]; int n; int main() { scanf("%d", &n); for(int i=1; i<=2*n; i++) scanf("%d", &…
昨晚听说有教做人场,去补了下玩. 大概我的水平能做个5/6的样子? (不会二进制Trie啊,我真菜) A. 傻逼题.大概可以看成向量加法,判断下就好了. #include<iostream> #include<cstdio> #include<algorithm> #include<cmath> using namespace std; int x1,x2,yy1,y2,x,y; int main(){ scanf("%d%d%d%d%d%d&qu…
题目链接 http://codeforces.com/contest/1009 A. Game Shopping 直接模拟即可,用了一个队列来存储账单 #include <iostream> #include <algorithm> #include <queue> #include <stack> #define ll long long using namespace std; ; queue<int> bill; int c[MAX]; i…
A The Contest 直接粗暴贪心 略过 #include<bits/stdc++.h> using namespace std; int main() {//freopen("t.txt","r",stdin); long long int n,sum=0,k; scanf("%lld",&n); for(int i=0;i<n;i++) { scanf("%lld",&k); sum…
A. Chess Tourney Berland annual chess tournament is coming! Organizers have gathered 2·n chess players who should be divided into two teams with n people each. The first team is sponsored by BerOil and the second team is sponsored by BerMobile. Obv…
期末后恢复性训练,结果完美爆炸... A,题意:2n个人,分成两队,要求无论怎么分配,第一队打赢第二队 #include<bits/stdc++.h> #define fi first #define se second #define mp make_pair #define pb push_back #define pi acos(-1.0) #define ll long long #define mod 1000000007 #define C 0.5772156649 #define…
F. Guards In The Storehouse time limit per test 1.5 seconds memory limit per test 512 megabytes input standard input output standard output Polycarp owns a shop in the capital of Berland. Recently the criminal activity in the capital increased, so Po…