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

J. Pollution Solution

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

의견: 0

설명

As an employee of Aqueous Contaminate Management, you must monitor the pollution that gets dumped (sometimes accidentally, sometimes purposefully) into rivers, lakes and oceans. One of your jobs is to measure the impact of the pollution on various ecosystems in the water such as coral reefs, spawning grounds, and so on. Figure J.1: Illustration of Sample Input 1. The model you use in your analysis is illustrated in Figure J.1. The shoreline (the horizontal line in the figure) lies on the \(x-ax\)is with the source of the pollution located at the origin (0,0). The spread of the pollution into the water is represented by the semicircle, and the polygon represents the ecosystem of concern. You must determine the area of the ecosystem that is contaminated, represented by the dark blue region in the figure.

제약
입력 형식

The input consists of a single test case. A test case starts with a line containing two integers \(n\) and \(r\), where \(3 \le n \le 100\) is the number of vertices in the polygon and \(1 \le r \le 1\,000\) is the radius of the pollution field. This is followed by \(n\) lines, each containing two integers \(xi\), y\(i\), giving the coordinates of the polygon vertices in count\(er-cl\)ockwise order, whe\(re - 1\,500 \le xi \le 1\,500\) and \(0 \le yi \le 1\,500\). The polygon does not se\(lf-in\)tersect or touch itself. No vertex lies on the circle boundary.

출력 형식

Display the area of the polygon that falls within the semicircle centered at the origin with radius \(r\). Give the result with an absolute error of at most \(10^{−}^{3}\).

예제 1
입력
6 10
-8 2
8 2
8 14
0 14
0 6
-8 14
출력
101.576437872
문제 정보

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

출처 ICPC World Finals 2013

평가 및 의견

J. Pollution Solution

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

Log in to rate problems.

개별 의견

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

풀이 제출

J. Pollution Solution

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