Ticket 11864
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
5
12 8
58 36 82 19 74 6 2 39 50 81 62 50 
6 5
99 47 98 56 83 27 
12 1
67 86 27 74 14 49 13 28 88 62 65 51 
16 4
65 74 83 47 39 78 74 18 75 7 20 59 40 43 66 45 
18 4
92 55 14 70 95 75 23 59 6 60 10 18 8 59 86 69 12 78 
Expected Output
68
82
624
207
221
Generator Parameters
--half_n_high 9 --half_n_low 1 --k_high 9 --k_low 1 --t_high 5 --t_low 5 --val_high 99 --val_low 0