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

30229번 - Land Division 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB245420.000%

문제

Uncle Trapezoid has a piece of land in the shape of a trapezoid that he would like to split into four pieces to bequeath to his four nieces. He is fairly lazy, so all he will do is pick a particular point inside of the trapezoid, and then the four pieces will be the four triangles formed by this point and each of the four sides of the trapezoid as illustrated below:

Naturally, Uncle Trapezoid wants to be as fair as possible and minimize the difference in area between the smallest triangle and the largest triangle.

Given the length of both bases and the height of a trapezoid, determine the smallest possible difference in area between the smallest and largest triangles formed by choosing any point inside of the trapezoid to form the four triangles (one with each side of the trapezoid).

Note: The bases must be parallel with a distance equal to the height between the two lines the bases define. However, where the bases are located relative to each other does not affect the answer to this problem.

입력

There is only one input line; it contains three integers: b1 (1 ≤ b1 ≤ 104), b2 (1 ≤ b2 < b1), and h (1 ≤ h ≤ 104), representing the lengths of the long base, short base and height of the trapezoid, respectively.

출력

Print the smallest possible difference in area between the smallest and largest triangles that the trapezoid could be partitioned into. Any answer within an absolute or relative tolerance of 10-6 will be accepted.

제한

예제 입력 1

20 12 16

예제 출력 1

8.000000000

예제 입력 2

20 18 10

예제 출력 2

0.263157895

힌트

출처

University > University of Central Florida > 2023 Local Programming Contest (Final Round) 6번

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

출처

대학교 대회

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

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