Ticket 5645
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
4 10
83 28 3 83 
9 6
96 58 2 8 32 76 48 33 28 
8 13
22 63 17 76 73 7 11 93 
8 6
87 35 98 7 26 73 99 90 
3 6
99 19 30 
3 15
68 35 49 
1 6
50 
7 4
12 20 53 65 50 63 30 
8 7
76 11 23 57 55 17 29 6 
7 10
78 76 82 74 66 19 18 
5 11
11 10 97 52 11 
9 8
18 75 79 33 69 39 91 13 74 
5 9
85 92 5 50 50 
3 9
88 92 11 
6 6
9 10 97 35 76 13 
2 1
15 99 
2 14
56 99 
7 8
93 63 94 11 7 50 94 
3 15
17 22 33 
2 12
83 53 
Expected Output
164
218
313
319
120
95
49
125
191
89
184
381
147
95
262
98
98
247
32
82
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