Ticket 17504
Problem 925 -a
Submission 318121566
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
3 3 1 0 1
1 

1
1 3 3 2
Expected Output
5
Your Output
1
Difference
Generator Parameters
--n_or_m_high 3 --n_or_m_low 3 --q_high 1 --q_low 1