結果

問題 No.1868 Teleporting Cyanmond
ユーザー aaaaaaaaaa2230
提出日時 2022-03-11 21:41:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 212 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 81,664 KB
実行使用メモリ 87,168 KB
最終ジャッジ日時 2024-09-16 01:52:13
合計ジャッジ時間 2,906 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
R = [0]+list(map(int,input().split()))+[n]

ans = 0
now = 1

while now < n:
    m = 0
    nex = R[now]
    for i in range(now,nex+1):
        m = max(m,R[i])
    ans += 1
    now = nex
print(ans)
0