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