結果
| 問題 | No.1868 Teleporting Cyanmond |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-14 19:00:24 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 258 bytes |
| 記録 | |
| コンパイル時間 | 315 ms |
| コンパイル使用メモリ | 85,432 KB |
| 実行使用メモリ | 84,492 KB |
| 最終ジャッジ日時 | 2026-05-16 18:49:26 |
| 合計ジャッジ時間 | 3,583 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 25 |
ソースコード
N = int(input())
lsR = list(map(lambda x:int(x)-1,input().split()))
now = 0
nextto = lsR[now]
cnt = 0
while True:
if now == N-1:
break
for j in range(now,nextto):
nextto = max(nextto,lsR[j])
now = lsR[now]
cnt += 1
print(cnt)