Nayeemzaman

Untitled

Oct 29th, 2020
572
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<bits/stdc++.h>
  2. #define optimize() ios_base ::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  3. using namespace std;
  4. int main()
  5. {
  6.  
  7. int n,i;
  8. cin>>n;
  9. int a[n+1];
  10.  
  11. int arr[100]={0};
  12.  for(i=0;i<n;i++)
  13.   {
  14.     cin>>a[i];
  15.  
  16.    arr[a[i]]++;
  17.   }
  18.   int pocket=0;
  19.   for(i=0;i<n;i++)
  20.   {
  21.     pocket=max(pocket,arr[a[i]]);
  22.   }
  23.   cout<<pocket<<endl;
  24.          return 0;
  25. }
RAW Paste Data