Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- map<int,int>mp;
- map<int,int>::iterator it;
- for(int i=0;i<n;i++)
- {
- int a;
- cin>>a;
- mp[a]++;
- }
- if(n<6) cout<<n<<endl;
- else
- {
- int minn=1e9;
- for(it=mp.begin();it!=mp.end();it++)
- {
- minn = min(minn,it->second);
- }
- cout<<minn<<endl;
- cout<<n-(minn*6)<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement