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

H. Room Service

Unrated 레이팅 미적용
난이도
3s
시간 제한
1024MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

You are working for a company designing cute, funny robot vacuum cleaners. At a high level, the robots’ behavior is divided into three modes: 1. Exploration 2. Vacuuming 3. Rampant Killing Unfortunately, while consumer testing shows that the last two modes are working perfectly, the exp\(lo- ra\)tion mode still has bugs. You’ve been put in charge of debugging. At the beginning of the exploration mode, the robot is placed into a convex polygonal room. It has sensors that should tell it where all the walls are. Your job is to write a program that verifies that these readings are correct. To do this, the robot needs to physically touch every wall in the room. Your problem is this: given the shape of a convex polygonal room with \(N\) walls and a starting point \(P\) inside it, determine the shortest route that touches each wall and then returns to \(P\). Touching a corner counts as touching both incident walls.

제약
입력 형식

Each test case starts with a line containing the number of vertices \(N\) of the polygon (\(3 \le N \le 100\)) and the integer coordinates \(P_{x}\) and \(P_{y}\) of the robot’s starting point (−\(10\,000 \le P_{x}\), \(P_{y} \le 10\,000\)). This is followed by \(N\) lines, each containing two integers \(x\), \(y\) (−\(10\,000 \le x\), \(y \le 10\,000\)) defining a vertex of the polygon. Vertices are given in counterclockwise order, all interior angles are less than 180 degrees, the polygon does not se\(lf-in\)tersect, and the robot’s starting point is strictly inside the polygon.

출력 형식

For each test case, display the case number and the length of the desired route, accurate to two decimal places.

예제 1
입력
4 0 0
-1 -1
1 -1
1 1
-1 1
3 10 1
0 0
30 0
0 20
출력
Case 1: 5.66
Case 2: 36.73
문제 정보

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

출처 ICPC World Finals 2012

평가 및 의견

H. Room Service

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

Log in to rate problems.

개별 의견

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

풀이 제출

H. Room Service

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