Ticket 4900
Problem 1665 -c
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
4
17
9 12 9 9 9 11 5 1 4 4 5 3 13 9 12 2 
5
1 5 1 2 
15
3 1 10 13 4 14 1 3 3 13 9 1 8 4 
16
3 6 1 10 7 13 2 3 15 16 15 1 10 6 2 
Expected Output
10
4
9
10
Generator Parameters
--WA_ON_TC_20 0 --n_high 19 --n_low 5 --t_high 5 --t_low 1