We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
intmain(){intn,max=0,q;cin>>n;map<int,int>m;for(inti=0;i<n;i++){cin>>q;m[q]++;if(m[q]>max)max=m[q];}cout<<n-max;/* Enter your code here. Read input from STDIN. Print output to STDOUT */return0;}
Equalize the Array
You are viewing a single comment's thread. Return to all comments →
c++ :)