RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
ICPC00081

I. Sensor Network

스페셜 저지 — 출력을 사용자 정의 프로그램으로 검사하므로 여러 정답이 인정될 수 있습니다.
Unrated 레이팅 미적용
난이도
2s
시간 제한
1024MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

A wireless sensor network consists of \(au- to\)nomous sensors scattered in an environment where they monitor conditions such as temp\(er- at\)ure, sound, and pressure. Samantha is a researcher working on the Amazon Carb\(on-di\)oxide Measurement (ACM) project. In this project, a wireless sensor n\(et- wo\)rk in the Amazon rainforest gathers en\(vi- ro\)nmental information. The Amazon rainf\(or- es\)t stores an amount of carbon equivalent to a decade of global fossil fuel emissions, and it plays a crucial role in the world’s oxyg\(en-tr\)ansfer p\(ro- ce\)sses. Because of the huge size of this forest, changes in the forest affect not only the local environment but also global climate by altering wind and ocean current patterns. The goal of the ACM project is to help scientists better understand earth’s complex ecosystems and the impact of human activities. Samantha has an important hypothesis and to test her hypothesis, she needs to find a subset of sensors in which each pair of sensors can communicate directly with each other. A sensor can communicate directly with any other sensor having distance at most \(d\) from it. In order for her experiments to be as accurate as possible, Samantha wants to choose as many sensors as possible. As one does not simply walk into the Amazon, Samantha cannot add new sensors or move those that are currently in place. So given the current locations of the sensors, she needs your help to find the largest subset satisfying her criteria. For simplicity, represent the location of each sensor as a point in a t\(wo-di\)mensional plane with the distance between two points being the usual Euclidean distance.

제약
입력 형식

The input consists of a single test case. The first line contains two integers \(n\) and \(d\) (\(1 \le n \le 100\) and \(1 \le d \le 10\,000\)), where \(n\) is the number of sensors available and \(d\) is the maximum distance between sensors that can communicate directly. Sensors are numbered 1 to \(n\). Each of the next \(n\) lines contains two integers \(x\) and \(y\) (−\(10\,000 \le x\), \(y \le 10\,000\)) indicating the sensor coordinates, starting with the first sensor.

출력 형식

Display a maximum subset of sensors in which each pair of sensors can communicate directly. The first line of output should be the size of the subset. The second line of output should be the (o\(ne- ba\)sed) indices of the sensors in the subset. If there are multiple such subsets, any one of them will be accepted.

예제 1
입력
4 1
0 0
0 1
1 0
1 1
출력
2
1 2
예제 2
입력
5 20
0 0
0 2
100 100
100 110
100 120
출력
3
4 3 5
문제 정보

생성자가 기록되지 않았습니다.

출처 ICPC World Finals 2014

평가 및 의견

I. Sensor Network

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

I. Sensor Network

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8