아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Great Treaty of Byteland

시간 제한0.5초메모리 제한1024 MB

요약
N개 수도 좌표가 주어질 때 보로노이 다이어그램에서 영역이 무한한 왕국, 즉 볼록 껍질 위에 있는 점들을 찾는다.
난이도

보통10점 중 7점

유형
기하, 정렬
정답자
아직 제출이 없습니다

문제

The Great War of Byteland is over. The remaining kingdoms are now discussing the Division Treaty, which will split all the land in the world among them. It will refer not only to the known world, but also to any territories yet to be discovered or inhabited, including land or sea. We can assume that the world is an infinite flat plane.

Each kingdom in the continent of Byteland has a single capital, and the Division Treaty will be based on their locations: it declares that each piece of land belongs to the kingdom whose capital is the nearest in a bird’s flight (or in a straight line). In other words: wherever you are in the world, if C is the single nearest capital to you, you will be in the territory of C’s kingdom. If there is a tie between the distances of two or more capitals, that place will be in the border between their kingdoms.

Under this treaty, some kingdoms may end up enclosed between others, while other kingdoms may end up with unlimited territory. Therefore, some monarchs are contesting the treaty. To inform this discussion, they demand your help. Given the location coordinates of each capital in the continent of Byteland, you must find out which kingdoms would have infinite territories under the Division Treaty.

입력

The first input line contains a single integer N (2 ≤ N ≤ 105), the number of kingdoms. Each kingdom is identified by an unique integer between 1 and N. Each of the N following lines contains two integers X and Y (0 ≤ X, Y ≤ 104), the 2D coordinates of the location of a kingdom’s capital. The capitals are given in increasing order of kingdom identifier, no two capitals have the same location, and you can assume that every capital has negligible size.

출력

Print a single line with a list of space-separated integers in increasing order: the identifiers of the kingdoms that would have infinite territories under the described Division Treaty. It’s guaranteed that there is always at least one such kingdom.

예제2

  1. 예제 1

    입력
    4
    3 2
    1 5
    3 6
    3 5
    
    예상 출력
    1 2 3 4
    
  2. 예제 2

    입력
    6
    2 1
    3 3
    1 4
    4 5
    6 3
    4 3
    
    예상 출력
    1 3 4 5