Ticket 3390
Problem 1660 -e
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

7
1110011
1110000
1001011
0001110
1101000
1001101
0011110

3
001
100
011

6
001010
000001
010111
010000
110110
011110

5
11011
01100
01011
01100
01111

4
1100
1010
1001
1001
Expected Output
23
1
14
12
4
Generator Parameters
--n_cap 2000 --n_high 7 --n_low 1 --t_cap 10000 --t_high 5 --t_low 1