Codeforces 231A. Team Solution

Solve in C++:

#include<iostream>
using namespace std;
int main(){

int t,i,j,v,p,a,p1=0,v1=0,t1=0,c=0,s=0;
while(cin>>a)
{
      s=0;
    for(i=1;i<=a;i++)
    {
        cin>>p>>v>>t;
        if(((p==1&&v==1)||t==1)&&((v==1&&t==1)||p==1)&&((p==1&&t==1)||v==1))
        {
        c++;
        }
    }
   cout<<c<<endl;
   c=0;

}



}

No comments

Most View Post

Recent post

Codeforces Round 971 (Div. 4) 2009C. The Legend of Freya the Frog Solution

  Problem Link    https://codeforces.com/contest/2009/problem/C S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. h ...

Powered by Blogger.