package pdd; //第一题双优先队列,头部比较 import java.util.Arrays; import java.util.PriorityQueue; import java.util.Scanner; public class Main1 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int T = scanner.nextInt(); for (int j = 0; j < T; j...