只写出来第一道....... import java.util.*; public class Main { static boolean isSuccess=false; public static void main(String[] args) { Scanner in = new Scanner(System.in); // 有n组 int groupNums=in.nextInt(); for (int i = 0; i < groupNums; i++) { // 箱子容...