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

27194번 - Meeting Near the Fountain 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB56023619339.388%

문제

Kira plans to meet with her friend Anna after $T$ minutes. The meeting point is in the center of the park near the fountain. The distance between the meeting point from Kira's current location is $n$ meters.

The path to the meeting point first goes through the city streets, and then through the park. Kira realized that she could be late for the meeting by getting there on foot, so she took an electric scooter.

Kira drove on an electric scooter through the city streets to the park entrance $m$ meters with a speed of $x$ m/s. Park is a pedestrian zone, where electric scooter speed is limited. Kira noticed that the electric scooter's speed reduced to $y$ m/s immediately after she entered the park.

Determine whether Kira will be at the meeting point in time, and, if not, how many minutes Anna will be waiting for Kira.

입력

The first line of the input contains two integers $n$ (500ドル \le n \le 10000$) and $T$ (1ドル \le T \le 60$) --- the distance in meters between Kira's start and the meeting point and the number of minutes until the meeting with Anna is planned.

The second line of the input contains a single integer $m$ (100ドル \le m \le 9000,ドル $m \le n$) --- the distance in meters between Kira's start and the park entrance.

The third line of the input contains two integers $x$ and $y$ --- (3ドル \le y < x \le 9$) --- the electric scooter's speed before the park entrance and in the park, respectively.

출력

If Kira gets to the meeting point on time, output a single integer --- 0ドル$.

If Kira is going to be late, output a single integer $L$ --- how many minutes Anna will be waiting for Kira. This value should be rounded up.

제한

예제 입력 1

5000 10
2500
8 4

예제 출력 1

6

힌트

출처

Olympiad > Russian Olympiad in Informatics > Russia Team High School Programming Contest > Russia Team High School Programming Contest 2022 A번

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

출처

대학교 대회

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

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