Untitled
raw download clone
TEXT
views 30
,
size 452 b
#include <iostream>
using namespace std;
int main()
{
    int n,m,a[101][101],cnt=0,i,j;
    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++)
    {
        bool ok=true;
        for(j=1;j<=m;j++)
            for(int k=j+1;k<=m;k++)
                if(a[i][j]!=a[i][k])
                    ok=false;
        if(ok)
            cnt++;
    }
    cout<<cnt;


    return 0;
}
close fullscreen
Login or Register to edit or fork this paste. It's free.