import java.util.Arrays; import java.util.Iterator; import java.util.PriorityQueue; import java.util.Scanner; public class Main { public static void main(String[] args) { Main p = new Main(); } public Main() { long startTime = System.currentTimeMillis(); solve(); long endTime = System.currentTimeMillis(); // System.out.println((endTime-startTime)/1000.0); } public void solve() { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); Monster[] monsters = new Monster[n]; for(int i=0;i cur = new PriorityQueue(n, new MonsterComparator()); // Monster[] newMonsters = monsters.clone(); // for(int j=0;j{ @Override public int compare(Monster o1, Monster o2) { if(o1.level!=o2.level) return o1.level-o2.level; else return o1.encount-o2.encount; } } }