1003A

Revision en1, by Sher-Locked, 2018-07-30 20:48:20

include<stdio.h>

int maxDup(int arr[], int size) { int counter = 0, pocket = 1;

int i,j;
for(i=0;i<size;i++)
{
    counter = 0;
    for(j=0;j<size;j++)
    {

        if(arr[i] == arr[j])
            counter++;

    }

    if(counter > pocket)
    {
        pocket = pocket + (counter - pocket);
    }


}


return pocket;

}

int main(void) { int n; int i; int arr[101]; scanf("%d",&n); for(i= 0;i <n;i++) { scanf("%d",&arr[i]); }

printf("%d\n",maxDup(arr, n));

return 0;

}

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Sher-Locked 2018-07-30 20:48:20 682 you should try at first yourself (published)