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

RESTful APIs with CRUD Operations in Laravel 12| (2025)

  RESTful APIs serve as the foundation of modern web development. They follow a set of rules called Representational State Transfer (REST) t...

Powered by Blogger.