fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define GG ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
  4. int main () { GG;
  5. int n,mx=0; cin>>n;
  6. map<int,int>m; pair<int,int>p;
  7. for(int i=0;i<n;i++)
  8. {cin>>p.first;
  9. m[p.first]++;
  10. }
  11.  
  12. for(auto i:m)
  13. if(i.second>mx)
  14. mx=i.second;
  15.  
  16. cout<<mx<<"\n";
  17. return 0;}
Success #stdin #stdout 0s 5304KB
stdin
4
4 2 4 3
stdout
2