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

28225번 - Flower Festival 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB43728025865.316%

문제

Today is the Flower Festival day. The festival is held in Rose Square, at the end of Flower Street. People are heading towards the festival on Flower Street with n cars, numbered 1 through n. Soroush, an expert traffic analyst, wants to know which car will arrive at Rose Square first. Using the traffic cameras on Flower Street, he has gathered the current location of all cars, along with their speeds. Each car maintains a constant speed throughout their journey. Also, the location of a car is defined as its distance from the start of Flower Street. Help Soroush find the first car that arrives at the festival. It is guaranteed that no two cars reach Rose Square at the same time.

입력

The first line of input contains two space-separated integers n (1 ⩽ n ⩽ 100) and f (1 ⩽ f ⩽ 10, 000), the number of cars and the length of Flower Street, respectively. The (i + 1)-th line (for 1 ⩽ i ⩽ n) contains the information of car numbered i, two space-separated integers xi (0 ⩽ xi < f) and vi (1 ⩽ vi ⩽ 100) indicating its observed location and speed, respectively.

출력

Print the number of the car which will arrive at Rose Square first.

제한

예제 입력 1

3 200
0 1
10 5
40 1

예제 출력 1

2

예제 입력 2

5 100
0 1
10 3
60 2
75 1
10 4

예제 출력 2

3

힌트

출처

ICPC > Regionals > Asia West Continent > Iran > 2022 ICPC Asia Tehran Regional Contest B번

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

출처

대학교 대회

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

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