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