結果
| 問題 |
No.1868 Teleporting Cyanmond
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-11 21:27:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 64 ms / 2,000 ms |
| コード長 | 208 bytes |
| コンパイル時間 | 231 ms |
| コンパイル使用メモリ | 81,868 KB |
| 実行使用メモリ | 83,324 KB |
| 最終ジャッジ日時 | 2024-09-16 01:30:39 |
| 合計ジャッジ時間 | 2,808 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge6 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
N = int(input())
R = list(map(int,input().split()))
M = [0] * N
M[0] = R[0]
for i in range(1,N-1):
M[i] = max(M[i-1],R[i])
count = 0
now = 1
while now < N:
count += 1
now = M[now-1]
print(count)