UVa 11286: Conformity is another problem that can be solved in a simple manner using a map. However, since maps are only sorted by key, this means it will take O(n) to find and count the number of occurances of the largest key in the map. This solution is fast enough, however. Here it is: