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

11514번 - Refract Facts 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB62373458.621%

문제

A submarine is using a communications laser to send a message to a jet cruising overhead. The sea surface is flat. The submarine is cruising at a depth $d$ below the surface. The jet is at height $h$ above the sea surface, and a horizontal distance $x$ from the sub. The submarine turns toward the jet before starting communications, but needs to know the angle of elevation, $\phi,ドル at which to aim the laser.

When the laser passes from the sea into the air, it is refracted (its path is bent). The refraction is described by Snell's law, which says that light approaching the horizontal surface at an angle $\theta_1,ドル measured from the vertical, will leave at an angle $\theta_2,ドル given by the formula

\[ \frac{\sin \theta_1}{\sin \theta_2} = \frac{n_1}{n_2} \]

where $n_1$ and $n_2$ are the respective refraction indices of the water and air. (The refraction index of a material is inversely proportional to how fast light can travel through that material.)

입력

Input will consist of one or more datasets.

Each dataset will consist of one line with 5 floating point numbers. In order:

  • $d,ドル the depth of the submarine (specifically, of the laser emitter) in feet, 1ドル \leq d \leq 800$
  • $h,ドル the height of the plane in feet, 100ドル \leq h \leq 10,000円$
  • $x,ドル the horizontal distance from the sub to the plane in feet, 0ドル \leq x \leq 10,000円$
  • $n_1,ドル the refractive index of water, 1ドル.0 < n_1 \leq 2.5,ドル
  • $n_2,ドル the refractive index of air, 1ドル.0 \leq n_2 < n_1$

A value of 0 for $d$ will signal the end of input.

출력

For each dataset, print a single line containing the angle of elevation in degrees, to two decimals precision, at which the submarine should aim its laser to illuminate the jet.

The angle should be displayed in degrees and rounded to the closest 1/100 of a degree. Exactly two digits after the decimal point should be displayed.

제한

예제 입력 1

600 600 1000 1.333 1.01
600 1200 4000 1.5 1.01
400 100 10000 2.5 1.01
0 0 0 0 0

예제 출력 1

44.37
11.51
2.30

힌트

출처

ICPC > Regionals > North America > South Central USA Regional > 2015 South Central USA Regional Programming Contest B번

ICPC > Regionals > North America > Mid-Atlantic Regional > 2015 Mid-Atlantic Regional Programming Contest B번

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

출처

대학교 대회

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

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