cf/mirror

Nearest Excluded Points

CF
1651D1900· candidate master4s256 MB⌨ stdin/stdout

Examples

Sample 1of 2
Input
6
2 2
1 2
2 1
3 2
2 3
5 5
Output
1 1
1 1
2 0
3 1
2 4
5 4
Sample 2of 2
Input
8
4 4
2 4
2 2
2 3
1 4
4 2
1 3
3 3
Output
4 3
2 5
2 1
2 5
1 5
4 1
1 2
3 2
1651D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…