codeforces 519C.. A and B and Team Training】的更多相关文章

C. A and B and Team Training time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A and B are preparing themselves for programming contests. An important part of preparing for a competition is s…
题目链接:http://codeforces.com/contest/519/problem/C 题目意思:给出 n 个  experienced participants  和 m 个 newbies ,需要组成尽量多的组,组由3个人组成.有两种组合方式:(1)1 个 experienced participant 和 2 个  newbie  (2)2 个 experienced participant 和 1 个  newbie.问最多能组成的组数是多少组. 昨天做的时候不是暴力做的,惯性…
C. A and B and Team Training time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A and B are preparing themselves for programming contests. An important part of preparing for a competition is s…
A and B and Team Training time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A and B are preparing themselves for programming contests. An important part of preparing for a competition is shar…
C. A and B and Team Training 题目:A and B are preparing themselves for programming contests. An important part of preparing for a competition is sharing programming knowledge from the experienced members to those who are just beginning to deal with the…
题目链接:http://www.codeforces.com/problemset/problem/231/A题意:问n道题目当中有多少道题目是至少两个人会的.C++代码: #include <iostream> using namespace std; int n, a, b, c, ans; int main() { cin >> n; while (n--) { cin >>a >> b >> c; ) ans ++; } cout <…
C. Team time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Now it's time of Olympiads. Vanya and Egor decided to make his own team to take part in a programming Olympiad. They've been best fri…
#include<stdio.h> #include<iostream> #include<memory.h> #include<math.h> using namespace std; ]; ]; ]; int main() { memset(flag1,,sizeof(flag1)); memset(flag2,,sizeof(flag2)); memset(flag3,,sizeof(flag3)); int n; cin>>n; ,kis…
题意 $a$个学生,$b$个教练 可以两个学生和一个教练一组,也可以两个教练和一个学生一组,问最多组成多少组 Sol 发题解的目的是为了纪念一下自己的错误思路 刚开始想的是:贪心的选,让少的跟多的分在一组里.事实证明这是错的,比如:500 500. 然后想的是:我们可以把教练和学生看着物品,密度最大应该是最优的,也就是$3$个教练和$3$个学生构成一组,但这样也是错的,比如7 11 又想了很久,发现我们根本就不用管他们是怎么分的,先特判掉$a < 2 * b$的情况,反正三个人一定能分成一组,那…
[链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 枚举第一种方法. 剩下的全都个第二种方法. 看看能组成多少个队伍就可以了. [代码] #include <bits/stdc++.h> #define ll long long using namespace std; int n,m; int main() { ios::sync_with_stdio(0),cin.tie(0); cin >> n >> m; int ans = 0; for(int…