标签:style blog class code c java
给定n k以及n个人已参加的比赛数,让你判断最少还能参加k次比赛的队伍数,每对3人,每个人最多参加5次比赛
#include <iostream> using namespace std; int main(){ int n,k, cnt = 0; cin >> n >> k; for(int i = 0 ; i < n; ++ i){ int a; cin >> a; if(a+k <= 5) cnt ++; } cout<<cnt/3<<endl; }
Codeforces Round #246 (Div. 2) A. Choosing Teams,布布扣,bubuko.com
Codeforces Round #246 (Div. 2) A. Choosing Teams
标签:style blog class code c java
原文地址:http://www.cnblogs.com/xiongqiangcs/p/3732132.html