포럼
문제 ICPC00162

B. Biking Duck

스페셜 저지 — 출력을 사용자 정의 프로그램으로 검사하므로 여러 정답이 인정될 수 있습니다.
설명

Gladstone Gander is walking through Duckburg and needs to get to his date with Daisy Duck as soon as possible. If he doesn't get there in time, Donald might show up and take his place instead.

Duckburg has recently started providing a very eco-friendly way of public transport: bikes. At many bike stations throughout the city, one can pick up a free bike, ride it to another bike station, and drop it there. This gives Gladstone two ways of transportion: on foot or by bike. Biking is faster, of course, but he must pick up and leave the bikes at the designated stations. Gladstone can walk or bike between any two points in a straight line.

Gladstone possesses a map of the (rectangular) center of Duckburg. His current position is on this map and so is the meeting point with Daisy. The map also contains the locations of all bike stations within the boundaries of the map.

There can be way more bike stations though, that are not within the boundaries of the map. Considering his luck, you can assume that the moment Gladstone walks (or bikes) off the map, he encounters a bike station if that suits him well. The bike stations not on the map can be located anywhere outside the map, they do not have to lie on integer coordinates.

That leaves Gladstone with the task of figuring out which route to take. Can you help him out? Given the map and his infinite amount of luck, what is the fastest time to his date with Daisy?

제약
입력 형식

The input consists of:
- one line with two integers \(v_{\text{walk}}\) and \(v_{\text{bike}}\) (\(1\le v_{\text{walk}}< v_{\text{bike}} \le 1\,000\)), the speeds of walking and of biking;
- one line with four integers \(x_1, y_1, x_2\) and \(y_2\) (\(-10^6\le x_1< x_2\le 10^6\); \(-10^6\le y_1< y_2\le 10^6\)), the bounding coordinates of the map of the center of Duckburg;
- one line with two integers \(x_{\text{G}}\) and \(y_{\text{G}}\), Gladstone's position;
- one line with two integers \(x_{\text{D}}\) and \(y_{\text{D}}\), Daisy's position;
- one line with one integer \(n\) (\(0\le n\le 1\,000\)), the number of known bike stations;
- \(n\) lines with two integers \(x_{\text{station}}\) and \(y_{\text{station}}\) each, the coordinates of the known bike stations.

All coordinates are on the map of the center, i.e., \(x_1\le x\le x_2\) and \(y_1\le y\le y_2\).

출력 형식

Output one line with the shortest possible time for Gladstone to get to Daisy. Your answer should have an absolute or relative error of at most \(10^{-6}\).

예제 1
입력
1 8
0 0 10 10
5 1
5 9
3
5 8
2 2
9 6
출력
3.000000000
예제 2
입력
5 100
0 -100000 100000 0
5 -30000
40000 -5
0
출력
501.9987496
문제 정보

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

출처 ICPC NWERC 2014

평가 및 의견

B. Biking Duck

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

Log in to rate problems.

개별 의견

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

풀이 제출

B. Biking Duck

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