Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //http://br.spoj.com/problems/POPULAR/
- #include <stdio.h>
- int main() {
- int n=0;
- int i, j;
- int maior=0;
- while(scanf("%d",&n)!=EOF && n!=0){
- int nota[n][n];
- int aux[n];
- memset(aux,0,sizeof(aux));
- memset(nota,0,sizeof(nota));
- maior = 0;
- for(i=0;i<n;i++){
- for(j=0;j<n;j++){
- scanf("%d",¬a[i][j]);
- if(nota[i][j]==1)
- aux[j]++;
- }
- }
- for(j=0;j<n;j++){
- if(aux[j]>maior)
- maior = aux[j];
- }
- printf("%d\n",maior);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement