L1-019 谁先倒 (15 分)(java) import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner in = new Scanner(System.in); int Al = in.nextInt(); int Bl = in.nextInt(); int c = in.nextInt(); int a = 0; int b = 0; for (int i = 0; i < c; i++) { int AH = in.nextInt(); int Ah = in.nextInt(); int BH = in.nextInt(); int Bh = in.nextInt(); // Ah==AH+BH if (Ah == AH + BH && Bh == AH + BH) { continue; } else if (Ah == AH + BH && Bh != AH + BH) { a += 1; if (a > Al) { System.out.println("A" +"\n"+ b); break; } } else if (Ah != AH + BH && Bh == AH + BH) { b += 1; if (b > Bl) { System.out.println("B" + "\n"+a); break; } } else { continue; } } } }