复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25#include<iostream> #include<cstdio> using namespace std; int main() { int n,t=0; int a[1010][3]; int sum[1010]={0}; scanf("%d",&n); for(int i=0;i<n;i++) { for(int j=0;j<3;j++) { scanf("%d",&a[i][j]); sum[i]+=a[i][j]; } } for(int i=0;i<n;i++) { if(sum[i]>=2) t++; } printf("%dn",t); return 0; }
就是比较一行中输入的三个数是不是大于或等于2,若满足累加器t加一
最后
以上就是痴情音响最近收集整理的关于codeforces 231A - Team的全部内容,更多相关codeforces内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复