포럼
문제 ICPC00318

J. Janitor Troubles

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

-7mm

-10mm

While working a night shift at the university as a janitor, you absent-mindedly erase a blackboard covered with equations, only to realize afterwards that these were no ordinary equations! They were the notes of the venerable Professor E. I. N. Stein who earlier in the day solved the elusive maximum quadrilateral problem! Quick, you have to redo his work so no one noticed what happened.

The maximum quadrilateral problem is quite easy to state: given four side lengths \(s_1, s_2, s_3\) and \(s_4\), find the maxiumum area of any quadrilateral that can be constructed using these lengths. A quadrilateral is a polygon with four vertices.

제약
입력 형식

The input consists of a single line with four positive integers, the four side lengths \(s_1\), \(s_2\), \(s_3\), and \(s_4\).

It is guaranteed that \(2s_i < \sum_{j=1}^4 s_j\), for all \(i\), and that \(1 \leq s_i \leq 1000\).

출력 형식

Output a single floating point number, the maximal area as described above. Your answer must be accurate to an absolute or relative error of at most \(10^{-6}\).

예제 1
입력
3 3 3 3
출력
9
예제 2
입력
1 2 1 1
출력
1.299038105676658
예제 3
입력
2 2 1 4
출력
3.307189138830738
문제 정보

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

출처 ICPC BAPC 2018

평가 및 의견

J. Janitor Troubles

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

Log in to rate problems.

개별 의견

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

풀이 제출

J. Janitor Troubles

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