Ticket 16866
Problem 1759 -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
9 8
8 8 1 8 9 9 1 3 5 
8 5
2 2 8 7 6 4 5 3 
Expected Output
9
8
Generator Parameters
--ai_high 9 --ai_low 1 --h_high 9 --h_low 1 --n_high 9 --n_low 1 --t_high 2 --t_low 1