Ticket 5785
Problem 1672 -d
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
8
8
1 6 8 1 1 6 8 4 
6 1 6 1 1 8 4 8 
2
2 2 
2 2 
5
5 3 2 4 1 
5 3 1 4 2 
6
5 1 1 5 6 2 
5 2 1 1 5 6 
6
2 6 2 5 6 6 
6 6 2 6 5 2 
9
2 1 5 9 3 8 5 6 3 
9 5 6 2 8 5 1 3 3 
3
1 1 2 
2 1 1 
7
3 4 1 4 1 2 3 
1 1 4 3 3 4 2 
Expected Output
NO
YES
NO
NO
NO
NO
NO
NO
Generator Parameters
--n_high 9 --n_low 1 --t_high 10 --t_low 1