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