포럼
문제 ICPC00340

B. Bellevue

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

As any photographer knows, any good sunset photo has the sun setting over the sea. In fact, the more sea that is visible in the photo, the prettier it is!

You are currently visiting the island Bellevue, and you would like to take a photo of either the sunrise to the east or the sunset to the west to submit it to Bellevue's Astonishing Photography Competition. By carefully studying the topographic maps, you managed to find the east-west profile of the island. Now you would like to know the maximal amount of sea that you could capture in a photo, measured as the viewing angle covered by water.

The profile of the island is given as a piecewise linear function consisting of \(n-1\) segments between \(n\) points. The island starts and ends at sea level. As an example, Figure shows the profile of the first sample case.

Note that the viewing angle of your lens is not large enough to capture the ocean to the east and west of the island in one shot. Also, the viewing angle of sea at sea level is \(0\) degrees.

제약
입력 형식

The input consists of:
- One line with an integer \(n\) (\(3\leq n\leq 50\,000\)), the number of points.
- \(n\) lines with two integers \(x_i\) and \(y_i\) (\(0\leq x_i, y_i \leq 50\,000\)), a point in the east-west profile of the island.

It is guaranteed that the points are given from left to right (\(x_1) and that the island starts and ends at sea level (\(y_1 = y_n = 0\)). The interior of the island is all above sea level (\(y_i > 0\) for \(1).

출력 형식

Output the maximal viewing angle of sea you can see, in degrees.

Your answer should have an absolute or relative error of at most \(10^{-6}\).

예제 1
입력
6
0 0
2 1
3 1
4 4
5 1
9 0
출력
45
예제 2
입력
5
1 0
5 4
6 1
8 2
9 0
출력
63.4349488
문제 정보

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

출처 ICPC BAPC 2022

평가 및 의견

B. Bellevue

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

Log in to rate problems.

개별 의견

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

풀이 제출

B. Bellevue

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