Ticket 5655
Problem 1671 -c
Submission 154545960
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
20
5 29
9 9 9 1 8 
2 16
3 4 
3 30
2 8 7 
9 7
1 1 4 2 8 6 9 9 7 
5 9
5 8 6 4 1 
6 29
7 1 2 6 1 7 
7 22
5 5 3 2 4 6 4 
9 20
3 2 1 2 5 5 9 8 2 
1 5
4 
6 13
1 2 7 2 4 2 
3 6
2 2 5 
3 1
8 8 5 
3 16
9 1 5 
6 10
5 1 6 6 5 5 
5 23
8 2 5 3 5 
7 21
4 4 3 3 8 3 2 
7 5
9 2 9 7 2 8 2 
2 13
4 1 
9 19
5 6 5 6 2 8 4 6 8 
2 25
4 2 
Expected Output
45
19
45
12
12
61
39
44
2
25
7
0
23
13
41
40
5
18
29
34
Your Output
45
19
45
12
12
61
39
43
2
25
7
0
23
13
41
40
5
18
29
34
Difference
Generator Parameters
--n_high 9 --n_low 1 --t_high 20 --t_low 20 --val_high 9 --val_low 1 --x_high 30 --x_low 1