Ticket 3637
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
3

1
1

7
1101000
0111111
1000011
1101100
1111011
0011000
1110100

5
11110
00100
11001
10101
01000
Expected Output
0
23
9
Generator Parameters
--n_high 7 --n_low 1 --t_high 5 --t_low 1