Ticket 11865
Problem 1690 -e
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
10
14 2
18 38 74 85 46 71 71 42 97 20 94 9 54 73 
14 9
98 1 94 55 47 70 23 97 73 1 30 56 72 23 
18 6
67 44 56 66 52 32 19 18 34 77 89 37 66 39 1 99 70 36 
6 6
9 76 12 55 1 6 
6 5
67 36 59 58 55 23 
18 6
37 34 69 78 93 90 57 17 72 72 10 72 69 75 14 97 53 69 
18 4
7 15 79 21 21 2 53 18 40 11 3 77 72 99 85 63 98 56 
14 2
57 10 80 74 54 90 58 45 11 35 0 24 79 8 
16 8
52 52 97 17 16 50 75 54 34 9 43 92 58 61 45 6 
4 6
97 88 81 46 
Expected Output
396
81
150
26
59
179
204
312
94
51
Generator Parameters
--half_n_high 9 --half_n_low 1 --k_high 9 --k_low 1 --t_high 10 --t_low 10 --val_high 99 --val_low 0