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

34288번 - Hill Climb Racing 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB106827877.228%

문제

Hill Climb Racing is a 2D mobile game where you drive speeding cars over hilly terrain while avoiding injuring the driver or running out of gas. An $l$ meter long track can be modeled as a 0-indexed array $h$ of $l+1$ integers where $h_i$ is the height in pixels at the $i$-th meter of the track. If the track becomes too steep for the car's acceleration, the car gets stuck on the hill and either flips over or runs out of gas.

Several of Mines' Computer Science undergraduates have been feeling nostalgic and recently began playing Hill Climb Racing again. However, they kept getting stuck on the steep hills in some tracks. Instead of upgrading their vehicles, the undergrads have decided to file bug reports for each track that they can't get over with their vehicles. After sifting through the game's code, they determined that a vehicle with acceleration value $a$ can ascend at most $a$ pixels per meter in the track. Note that a vehicle may descend any number of pixels per meter no matter its acceleration.

Your job is to write a program which, given a track, determines if it can be climbed by a vehicle with acceleration $a$.

입력

The first line of input consists of 2 integers, $l$ and $a$ (1ドル \leq l, a \leq 10^5$)---the length in meters of the track and the acceleration value of the vehicle, respectively.

The second line of input contains $l + 1$ space separated integers, $h_0, h_1, \ldots, h_l$ (0ドル \leq h_i \leq 10^5$)---the heights in pixels of the track.

출력

Output "BUG REPORT" (without quotes) on a single line if it is impossible to pass that track; otherwise, output "POSSIBLE".

제한

예제 입력 1

4 3
1 2 5 1 1

예제 출력 1

POSSIBLE

예제 입력 2

4 3
0 3 1 5 0

예제 출력 2

BUG REPORT

예제 입력 3

3 100000
0 99999 1 100000

예제 출력 3

POSSIBLE

힌트

출처

School > CS@Mines > CS@Mines HSPC 2025 H번

  • 문제를 만든 사람: Nathan George
(追記) (追記ここまで)

출처

대학교 대회

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

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