Ticket 12262
Problem 1629 -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
2
6
12 5 4 4 7 7 
9 15 6 8 13 0 
4 14 5 11 0 13 
6 10 7 12 13 12 
11 9 0 1 6 12 
15 7 3 14 8 12 
2
4 0 
0 4 
Expected Output
7
4
Generator Parameters
--n_half_high 3 --n_half_low 1 --t_high 2 --t_low 1 --val_high 9 --val_low 0