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