Ticket 16133
Problem 1715 -c
Submission 170357440
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
7 6
4 1 7 8 8 3 2 
2 4
7 3
3 6
1 5
5 9
7 9
Expected Output
66
60
60
66
78
84
Your Output
66
60
60
66
70
76
Difference
Generator Parameters
--m_high 9 --m_low 1 --n_high 9 --n_low 1 --val_high 9 --val_low 1 --x_high 9 --x_low 1