Ticket 7147
Problem 1680 -c
Submission 157232275
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
78
01000000000000001000010000000001
00000010001000001001000100000100
11111111111011111111111011111111111
11011111111110011010011100111101111011110
10011000101110100011000100010101001100111011000001101001000101100101
0101100111
10110000010000001001110100011010000110001100010100000001010100001001011011001100101
0000100001000001000000000000000000000000010101000100000000100
00000001000010000100001000001100000000000010000010
1
0000000000000000001000000000000000000010000000000000000000000000000000000000000000000100000000001
111101111111101111111111111111111111111111
000100000100101011000000010000010000000000000010010000010000010000110000010001001010101001
0100010100000100000000000010000100001
01101100010100100011110111100000110000000001001011010101001001010101010
0010001000000000000110000010101111001011001010011100001000000001100000000100000001001001
000000111
11100010010
111111110
1010110001110101
111100011001010010
0000000001000000000001001000000000000000
11010001001010110111011111001101110011101100111111001
11
0011101011101100101110
011111011001111001111011100111111011100100111000100101110000101011010
11011101010001111110010011101010110111110010001110001111
0000000
01101100010000101111001101111101010000010001000100001000000000110100
101
000010000010000100110
0000010000000001011010110100010
1101100010100100000011100010111110001100100010100011000011010
100000000000000000100000000100000100001000000001010
00000000000100000000000000000000000000001000000
101101000001000000100110001000010000100011001010100011010000000010011011000000001100
11111110
1110110010110100000000101110010001110110011011111100111111110011110111
1100010000001100111100010
000011000000001001000010100000010000000100101000010000000011000100010100100
010001001100110101100001110001011000010010100110011110101100001101011101101010011
110001110011000110100010000010011100101010011010000000100000011101110101110101011
01000000010010100000
11110111111111010110111111111101101101111111111110111111110100011011101111110111011011011
111
10001011011011100100010101111111111010111110100011101101110011011
00010000000000000000010000000000000000100000000000010001
1010100000100000001010
1111011101010111111
100001100100000011011000101100001110000100001000001110011100011000000011111000100111001000001100000
0000010000101000000000000011000010000100100101000010010000001100100000100000
0100101111111111111111011111110111111111111101111111101111111110011111100110111111111100111
11111111111111111111111111111111111111111111111110111111011011111111111110111011110110111111111111
1010101111011111101111101
00000000110000000000010001000000100000000101000000000000000000000000010
000000000000010000000010000000000000000000001000010000000000010000
11111111111011110111111111111111111011111
00000000000000000000000000000000000000000000000000000000000000000000010000000
000100000000000000000000000000000000
0001000100
100010110100101110101111111110000
1111101110111111010010110111111111110101111111111001011101111111111111110111111
00111101011110101
11111011011110110101111111101110110000011111110100
101110001111011001111011011111010111011011001101111011111011110111111111111010111101000010011111
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
011111111111110111010101111111110111101110111111100111011101111101
100111101010000101001011100011000100001011001001100111101000001001001100001000011100110000
11101010001010000011100111010010110001101111110011111111101101011010100110001100010111101
000001000001010000
1110111111111101011
1100100000010000000001000
1111010101111111111101111101111110001111111101111011100011111110111101111010
01110101110010
0010111111111111
11110101110111111111111111111111001110
1111110111111011110111011011111011111111001
0001000000000001010000000000000000100000000001000000000000100
Expected Output
3
4
2
8
16
2
18
5
5
0
3
2
13
4
15
11
0
2
0
4
3
2
9
0
4
13
13
0
11
1
2
3
13
5
1
16
0
13
4
11
17
20
2
13
0
12
3
3
4
19
11
9
7
3
6
4
3
0
0
1
5
12
2
8
16
0
9
19
17
1
2
2
11
2
1
3
6
4
Your Output
3
4
2
8
16
2
18
5
5
0
3
2
13
4
15
11
0
2
0
4
3
2
9
0
4
13
13
0
11
1
2
3
13
5
1
16
0
13
4
11
17
20
2
14
0
12
3
3
4
19
11
9
7
3
6
4
3
0
0
1
5
12
2
8
16
0
9
19
17
1
2
2
11
2
1
3
6
4
Difference
Generator Parameters
--n_high 100 --n_low 1 --t_high 100 --t_low 1