Ticket 5615
Problem 1671 -d
View hacks & all small testcases

Unable to dry run this testcase?
Try making a new request with small values of n_high, t_high, *_high, etc.


Retry
Input
20
6 13
3 74 21 34 38 57 
2 6
97 75 
1 14
99 
1 3
17 
6 12
11 81 77 83 18 50 
1 5
35 
5 6
51 91 31 66 43 
6 9
11 83 47 96 39 14 
9 4
67 17 30 77 39 87 54 86 94 
9 13
25 27 8 95 99 25 4 60 82 
4 13
15 30 56 65 
3 13
26 5 29 
2 13
71 87 
5 6
62 70 46 44 4 
6 2
27 91 42 49 95 97 
7 6
76 89 30 40 86 85 49 
3 4
41 39 85 
1 9
7 
4 6
64 10 46 15 
1 4
98 
Expected Output
162
96
98
16
187
34
200
249
301
291
64
53
86
77
194
213
88
8
135
97
Generator Parameters
--n_high 9 --n_low 1 --t_high 20 --t_low 20 --val_high 99 --val_low 1 --x_high 15 --x_low 1