Ticket 5585
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
3 11
58 21 27 
1 2
96 
8 4
95 41 58 51 87 27 98 8 
3 11
96 77 91 
7 10
80 81 74 72 5 47 1 
3 8
46 99 2 
1 7
69 
9 11
89 69 76 89 15 61 31 25 97 
2 10
84 94 
9 3
90 37 26 11 79 99 48 37 15 
5 7
14 31 11 26 32 
9 14
98 23 5 74 29 47 62 40 47 
9 6
93 74 88 19 7 4 84 22 38 
3 15
71 77 48 
1 2
29 
6 7
96 1 2 91 65 83 
7 4
50 42 82 91 13 50 76 
6 13
25 80 80 5 21 32 
5 3
46 23 75 82 20 
4 12
24 96 33 94 
Expected Output
69
95
342
123
165
151
68
296
93
265
71
277
281
82
28
229
222
165
163
219
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