Nice Set of Points
시간 제한1초메모리 제한256 MB
최대 10000-N개의 정수 좌표 점을 추가해, 같은 x나 같은 y를 공유하는 이동만으로 두 점 사이 최단 경로 길이가 맨해튼 거리와 같아지도록 만든다.
문제
Consider a set of points. You can move directly between two points if their x-coordinates are the same or their y-coordinates are the same. A set of points is called nice if for any two points in the set, the length of the shortest (direct or indirect) path is equal to the manhattan distance between them.
You are given points. The -th point is at .
You are allowed to add up to points. Convert the given set of points into a nice set.
입력
출력
Let be the number of added points, and be their coordinates. After adding these points to the set, you get points. These points must be pairwise distinct, and this set must be nice. The coordinates must be integers.
Output the answer in the following format.
If there are multiple possible solutions, output any.
제한
- The points are pairwise distinct.
- Under these constraints, it is guaranteed that at least one solution exists.
- All values in the input are integers.
힌트
In Sample 1, if you add , you can move between and via .