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 925 (Div. 3) 1931D. Divisible Pairs Solution

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

Powered by Blogger.