# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1188622 | krittaphot | Rabbit Carrot (LMIO19_triusis) | Pypy 3 | 135 ms | 48800 KiB |
def min_modifications(n, m, heights):
current_height = 0
changes = 0
for h in heights:
if h - current_height > m:
# ต้องลดเสานี้ลงมาให้อยู่ในระยะกระโดด
changes += 1
current_height = current_height + m
else:
# ไม่ต้องแก้ เพราะกระโดดถึง (ขึ้นไม่เกิน M หรือ ลง)
current_height = h
return changes
컴파일 시 표준 출력 (stdout) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |