Ticket 7207
Problem 1679 -b
Submission 157192323
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
8 5
7 4 7 2 3 2 3 7 
1 2 7
2 9
1 8 6
1 8 9
1 4 3
Expected Output
38
72
69
72
66
Your Output
38
72
69
69
63
Difference
Generator Parameters
--n_high 9 --n_low 1 --q_high 5 --q_low 1 --val_high 9 --val_low 1 --x_high 9 --x_low 1