Ticket 1577
Problem 1651 -d
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
6
1 1
1 8
3 5
5 6
8 3
9 7
Expected Output
0 1
0 8
2 5
4 6
7 3
8 7
Generator Parameters
--co_ord_cap 200000 --co_ord_high 9 --co_ord_low 1 --n_cap 200000 --n_high 7 --n_low 1