AD1

Friday, 16 June 2017

Teams Problem

Problem 
http://codeforces.com/contest/231/problem/A

Solution
#include <iostream>
#include <cstdlib>
using namespace std;
int main(int argc, char** argv) {
unsigned int n;// number of problems
unsigned int o1,o2,o3;// team memebrs
unsigned int pass=0;
unsigned int fail=0;
cin>>n;
for(int i=0;i<n;i++)
{
cin>>o1>>o2>>o3;
if(o1+o2+o3>=2){pass++;}
else if(o1+o2+3<2){fail++;}
}
cout<<pass;
return 0;
}
view raw teams.cpp hosted with ❤ by GitHub




No comments:

Post a Comment