Java 自建小顶堆实现 import java.util.PriorityQueue; import java.io.*; public class Main { static final StreamTokenizer st = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in))); static int nextInt() { try { st.nextToken(); } catch (Exce...