农场主由中间开始浇N次水。格子低兔子先喝到水。求没有喝到、喝到1~2次,大于2次水的兔子数量。
public class 农场里饲养了N只兔子 { private static int[][] rabbit; private static int time; public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); rabbit = new int[n][2]; for (int i = 0; i < n; i++) { int high = scanner.nextInt(); rabbit[i][0] = high; } time = scanner.nextInt(); int start = scanner.nextInt(); water(start); int a = 0; int b = 0; int c = 0; for (int[] rab : rabbit) { if (rab[1] == 0) { a++; } else if (rab[1] > 2) { c++; } else { b+&#