You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
360 B

#include<bits/stdc++.h>
using namespace std;
int main () {
int n,i,j,sum=0;
scanf("%d",&n);
int a[n][n];
int b[21]= {0};
for(i=0; i<n; i++)
for(j=0; j<n; j++)
scanf("%d",&a[i][j]);
for(i=0; i<n; i++)
for(j=0; j<n; j++) {
if(a[i][j]==1&&i!=j) {
b[j]++;
}
}
for(i=0; i<n; i++)
if(b[i]>=n/2) {
printf("%d ",i+1);
}
return 0;
}