Ticket 15980
Problem 1679 -b
Submission 166915491
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 13
7 1 3 3 4 
1 1 9
1 3 2
2 9
1 4 5
2 8
1 4 1
2 7
1 2 6
1 1 7
1 5 7
1 5 3
1 3 2
1 3 7
Expected Output
20
19
45
41
40
33
35
34
34
34
30
25
30
Your Output
20
19
45
41
40
33
35
34
34
34
30
25
25
Difference
2020
1919
4545
4141
4040
3333
3535
3434
3434
3434
3030
2525
3025
Generator Parameters
--n_high 9 --n_low 1 --q_high 15 --q_low 1 --val_high 9 --val_low 1 --x_high 9 --x_low 1