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

26175번 - Bottle Flip 스페셜 저지다국어

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

문제

It marks the year 2022 where the bottle flip challenge finally reached the last people on earth; the NWERC Jury. As you may know, the objective of the challenge is to flip a bottle of water 360ドル^{\circ}$ through the air and hope that it lands standing upright. Figure B.1 demonstrates a successful bottle flip.

After many failed attempts, we noticed that this task gets significantly easier if the bottle is filled with just the right amount of water. The simple reason for this is that the amount of water affects the centre of mass of our bottle as it is about to land.1 A lower centre of mass makes it easier for the bottle to stay upright after it lands. Unfortunately, the optimal amount of water depends on the bottle, and we already wasted enough time on this challenge\dots

Figure B.1: Sketch of a bottle flip. The bottle is filled to roughly 33ドル\%$ to ease the challenge.}

Given that our bottle is a perfect cylinder of height $h$ and radius $r,ドル determine the optimal amount of water the bottle should contain so that our chances of landing a successful bottle flip are maximised. You can assume that both the water and the air contained in the bottle have uniform density, and that the weight of the bottle itself is negligible.


1For the sake of completeness, we define the centre of mass as the unique point at which the whole mass of the bottle could be concentrated without changing the bottle's reaction to gravity, regardless of the orientation of the bottle. Note that we implicitly assume that the water will stay at the bottom of the bottle. This defines exactly what you would intuitively think of as centre of mass.

입력

The input consists of:

  • One line with four integers $h,ドル $r,ドル $d_a,ドル and $d_w$ (1ドル \leq h, r, d_a, d_w \leq 1000,ドル $d_a < d_w$), where $h$ and $r$ are the height and radius of the bottle, and $d_a$ and $d_w$ are the densities of air and water, respectively.

출력

Output the height such that filling the bottle with water up to this height results in the lowest possible centre of mass while the bottle is standing upright. Your answer should have an absolute or relative error of at most 10ドル^{-6}$.

제한

예제 입력 1

22 4 1 4

예제 출력 1

7.3333333333

예제 입력 2

7 2 655 988

예제 출력 2

3.1415941720

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > NWERC 2022 B번

  • 문제를 만든 사람: Jorke de Vlas
(追記) (追記ここまで)

출처

대학교 대회

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

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