Ticket 9099
Problem 1682 -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
5
6
4 3 2 1 1 3 
6
3 4 1 3 1 3 
6
1 4 1 1 1 2 
6
4 2 2 1 2 3 
6
1 1 2 4 4 4 
Expected Output
3
3
2
3
3
Generator Parameters
--n_high 6 --n_low 6 --t_high 5 --t_low 5 --val_high 4 --val_low 1