Ticket 6497
Problem 1661 -e
Submission 155778600
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
21
011000001111110011100
100111011001000100000
110010111111011011100
48
4 6
10 21
6 10
6 16
13 16
4 6
7 12
2 21
7 18
7 13
5 14
10 13
18 20
18 20
16 20
16 19
1 15
15 21
13 14
3 3
9 9
14 19
7 9
4 14
11 16
2 4
4 10
13 19
10 14
7 20
2 11
5 8
8 11
8 19
12 14
3 11
2 10
10 14
10 21
2 15
6 20
13 16
6 15
4 20
3 8
2 12
3 10
8 11
Expected Output
1
5
2
4
3
1
1
8
5
1
3
1
2
2
3
3
5
4
2
1
1
5
1
3
3
3
2
5
2
5
4
2
1
5
2
3
4
2
5
5
6
3
3
6
3
4
3
1
Your Output
1
6
2
4
3
1
1
8
5
1
3
2
2
2
3
3
5
4
2
1
1
5
1
3
3
3
2
5
3
5
4
2
1
5
2
3
4
3
6
5
6
3
3
6
3
4
3
1
Difference
Generator Parameters
--n_high 30 --n_low 1 --q_high 100 --q_low 1