import java.util.Scanner;import java.util.TreeMap;public class Main { public static void main(String[] args) { TreeMap map = new TreeMap(); Scanner sc = new Scanner(System.in); int N = sc.nextInt(); for (int i = 0; i 0) { count++; Integer [] key = map.keySet().toArray(new Integer[0]); Integer close = map.get(map.firstKey()); for(Integer i:key) { if(map.get(i)>=close) { map..