Advertisement
sajid161

7:5

Jan 3rd, 2021
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     int n;
  6.     cin>>n;
  7.     vector<long long>v(n);
  8.     map<long long,int>mp;
  9.     for(int i=0;i<n;i++)
  10.     {
  11.         cin>>v[i];
  12.         mp[v[i]]++;
  13.     }
  14.     int ans=0;
  15.     for(auto u:mp)
  16.     {
  17.         if(u.second>ans) ans=u.second;
  18.     }
  19.     cout<<ans;
  20.  
  21.  
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement