Logo
(追記) (追記ここまで)

16313번 - Janitor Troubles 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB16713412083.333%

문제

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 s1, s2, s3 and s4, 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 s1, s2, s3, and s4.

It is guaranteed that 2si < Σ4j=1 sj, for all i, and that 1 ≤ si ≤ 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

예제 출력 1

9

예제 입력 2

1 2 1 1

예제 출력 2

1.299038105676658

예제 입력 3

2 2 1 4

예제 출력 3

3.307189138830738

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2018 J번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /