Răspuns:
#include<iostream>
using namespace std;
int main()
{
int n,m,i,j,a[101][101],kpare,kmax=-1;
cin>>n>>m;
for(i=1;i<=n;i++)
for(j=1;j<=m;j++)
cin>>a[i][j];
for(i=1;i<=n;i++)
{
kpare=0;
for(j=1;j<=m;j++)
{
if(a[i][j]%2==0)
kpare++;
}
a[i][0]=kpare;
if(kpare>kmax)
{
kmax=kpare;
}
}
for(i=1;i<=n;i++)
{
if(a[i][0]==kmax)
cout<<i<<" ";
}
}
Explicație: