Archipelago
면접 대비시간 제한2초메모리 제한1024 MB
섬 n개의 좌표와 배의 이동 거리 d가 주어질 때, 길이 d 이하의 이동을 여러 번 이어서 도달할 수 있는 섬의 수가 많은 순서대로 섬을 나열한다.
문제
The company you work for, Boats to Get Out (BGO), has recently discovered a new archipelago that simply begs to become a new tourism hotspot. The islands are all extremely tiny, so there should be ample opportunity to base almost all transportation in the region on boats.
Unfortunately, the islands are so far out in the ocean that the standardized boat BGO provide is not able to reach any of them from the mainland; their boats can only hold enough fuel to travel a distance of kilometers. To access the archipelago at all hence require that an airport is built on one of the islands. But where should it be located?
The BGO boss has ordered you to list out all the islands in order from highest to lowest airport utility. The airport utility of an island is defined as the number of islands it is possible to reach by boat from that island using any number of intermediate stops on other islands for refuelling.
입력
The first line of input consists of two space-separated integers and , where signify the number of islands and indicates how far a boat can travel in kilometers before it needs to refuel. The islands are named from to . The next lines of input describes the location of the islands. The such line contains two space-separated integers and which describe the coordinates of island .
출력
Output a single line containing space-separated integers indicating a ranking of the islands from highest to lowest airport utility. If there are multiple islands with the same utility, you may output them in any order as long as their airport utility is non-increasing.