12798 – Handball

Problem Link

<Source Code>

#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
ll n,i,j,co=0,maxg,m,x,goal;
while(scanf(“%lld %lld”,&n,&m)==2)
{goal=0,co=0,maxg=0;
for(i=0;i<n;i++)
{
co=0;
for(j=0;j<m;j++)
{
scanf(“%lld”,&x);
if(x>0)
co++;
}
if(co==m)
{goal++;

}
maxg=max(goal,maxg);
}
printf(“%lld\n”,goal);
}

}

Advertisements

About waprogramming

I am in CSE,from CUET
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s