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

32608번 - Admiring Droplets 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 1024 MB343323100.000%

문제

On a rainy day, Davina is travelling by train to the Fluffy Puppy College. It is a long ride, and she is dozing away, admiring the rain droplets rolling down the window. Some droplets appear to go faster than others, so she pretends that the droplets are racing each other to the bottom. Shaking herself awake, she wants to see if she can predict how fast exactly these droplets roll down the window.

For all droplets she sees in one vertical line on the window, she has noted the sizes and positions of these droplets. She finds the velocity of a droplet to be exactly proportional to the sixth root of its volume: $v = \sqrt[6]{V},ドル where $v$ is in $\text m/\text s$ and $V$ is in $\text{m}^3$. When two droplets meet, they coalesce into a single droplet, the speed of which immediately changes according to this equation. You can assume the droplets to be point-like.1

Initially, all droplets are stationary. From the moment that the droplet at the very top starts rolling down the window, calculate the time that it takes for the fully coalesced droplet to reach the bottom of the window.

As an example, consider the first sample input. The first droplet starts rolling with a velocity of $v = \sqrt[6]{10 \cdot 10^{-9}} \text{ m}/\text{s} \approx 46\text{ mm}/\text{s}$. It meets the second droplet after 100ドル/46 \approx 2.2\text{ s}$. They coalesce into a droplet of 40ドル\text{ mm}^3$ with a speed of $v = \sqrt[6]{40 \cdot 10^{-9}} \text{ m}/\text{s} \approx 58\text{ mm}/\text{s}$. This new droplet meets the third droplet after 200ドル/58 \approx 3.4\text{ s}$. The fully coalesced droplet has a volume of 60ドル\text{ mm}^3$ and a speed of $v = \sqrt[6]{60 \cdot 10^{-9}} \text{ m}/\text{s} \approx 63\text{ mm}/\text{s}$. It reaches the bottom of the window after 100ドル/63 \approx 1.6\text{ s}$. This makes the total time 2ドル.2+3.4+1.6 \approx 7.2\text{ s}$.


1I.e., to be infinitesimally small / dimensionless.

입력

The input consists of:

  • One line with two integers $n$ and $h$ (1ドル\leq n\leq 10^5,ドル $n\leq h\leq 10^9$), the number of droplets and the height of the window in $\text{mm}$.
  • $n$ lines, each with two integers $s$ and $y$ (1ドル\leq s\leq 300,ドル 0ドル \leq y < h$), the size of a droplet in $\text{mm}^3$ ($\mu\text{L}$) and the distance of a droplet from the top of the window in mm.

The $y$-coordinates of the droplets are strictly increasing (i.e., they are distinct and ordered from top to bottom).

출력

Output the time it takes for the fully coalesced droplet to reach the bottom of the window after the first droplet starts rolling, in seconds.

Your answer should have an absolute or relative error of at most 10ドル^{-6}$.

제한

예제 입력 1

3 500
10 100
30 200
20 400

예제 출력 1

7.17262460528476

예제 입력 2

5 1000
1 100
42 200
300 300
100 400
10 500

예제 출력 2

12.89774177896886

힌트

출처

University > Delft University of Technology > Freshmen Programming Contest 2023 A번

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

출처

대학교 대회

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

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