/* Problem statement: Given an array of integers, determine the minimum number of elements to delete to leave only elements of equal value. Example: arr = [1, 2, 3, 4] Delete the 2 elements 1 and 3 leaving arr = [2, 2]. If both twos plus either the 1 or the 3 are deleted, it takes 3 deletions to leave either [3] or [1]. The minimum number of deletions is 2. */ #include using namespace std; int findMaxOccurence (map &list) { int max = 0; for (map::iterator i = list.begin(); i != list.end(); ++i) { if ((*i).second > max) max = (*i).second; } return max; } int main () { int n, elem; cin >> n; int p = n; map list; while (n--) { cin >> elem; list[elem]++; } cout