시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 32 MB | 9 | 0 | 0 | 0.000% |
The government of Treeland wants to build a new road network. There are 2N cities in Treeland. The unfinished plan of the road network already contains N road segments, each of which connects two cities with a straight line. No two road segments have a common point (including their endpoints).
Your task is to determine N − 1 additional road segments satisfying the following conditions:
The first line contains N, the number of existing road segments. Each of the following N lines contains four integers: x1, y1, x2, y2, where (x1, y1) and (x2, y2) are the coordinates of the endpoints of the segment.
You should print N − 1 lines, each of them containing four integers, x1, y1, x2, y2, where (x1, y1) and (x2, y2) are the coordinates of the cities that are the endpoints of a new road segment. If there are multiple solutions, your program may output any of them.
번호 | 배점 | 제한 |
---|---|---|
1 | 15 | All input segments are vertical |
2 | 15 | Each pair of input segments are parallel |
3 | 15 | Each input segment is either horizontal or vertical |
4 | 15 | N ≤ 10 000 |
5 | 40 | No additional constraints |
5 1 3 3 6 5 1 5 3 3 3 6 5 2 1 4 1 2 3 4 2
1 3 2 1 2 1 2 3 2 3 3 3 4 1 5 1