| 3 | |
| 4 | public class Main { |
| 5 | public static void main(String args[]) { |
| 6 | Scanner sc = new Scanner(System.in); |
| 7 | int test = sc.nextInt(); |
| 8 | while (test-- > 0) { |
| 9 | int n = sc.nextInt(); // till date |
| 10 | int d = sc.nextInt(); // reduce amount |
| 11 | int h = sc.nextInt(); // red alert |
| 12 | int arr[] = new int[n]; |
| 13 | for (int i = 0; i < n; i++) { |
| 14 | arr[i] = sc.nextInt(); |
| 15 | } |
| 16 | func(arr, n, d, h); |
| 17 | // System.out.println(Arrays.toString(arr)); |
| 18 | } |
| 19 | } |
| 20 | |
| 21 | public static void func(int[] arr, int n, int d, int h) { |
| 22 | int waterLevel = 0; |