Ticket 2021
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
9
2 1
4 3
3 5
3 2
2 3
1 1
1 3
4 5
1 5
Expected Output
2 0
3 3
2 5
2 2
2 2
0 1
0 3
4 4
0 5
Generator Parameters
--co_ord_cap 200000 --co_ord_high 5 --co_ord_low 1 --help_choosing_params Help --n_cap 200000 --n_high 25 --n_low 1