結果

問題 No.1868 Teleporting Cyanmond
ユーザー ああいいああいい
提出日時 2022-03-11 21:27:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 97 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 2,231 ms
コンパイル使用メモリ 86,680 KB
実行使用メモリ 91,172 KB
最終ジャッジ日時 2023-10-14 06:14:25
合計ジャッジ時間 4,410 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,264 KB
testcase_01 AC 71 ms
71,220 KB
testcase_02 AC 70 ms
71,208 KB
testcase_03 AC 94 ms
88,752 KB
testcase_04 AC 87 ms
84,688 KB
testcase_05 AC 77 ms
76,292 KB
testcase_06 AC 76 ms
76,240 KB
testcase_07 AC 87 ms
81,116 KB
testcase_08 AC 79 ms
78,440 KB
testcase_09 AC 80 ms
80,200 KB
testcase_10 AC 90 ms
87,324 KB
testcase_11 AC 76 ms
76,064 KB
testcase_12 AC 80 ms
77,224 KB
testcase_13 AC 85 ms
81,340 KB
testcase_14 AC 94 ms
89,256 KB
testcase_15 AC 87 ms
84,536 KB
testcase_16 AC 78 ms
76,428 KB
testcase_17 AC 78 ms
77,112 KB
testcase_18 AC 96 ms
90,912 KB
testcase_19 AC 97 ms
90,908 KB
testcase_20 AC 96 ms
90,904 KB
testcase_21 AC 96 ms
90,988 KB
testcase_22 AC 96 ms
91,172 KB
testcase_23 AC 97 ms
91,068 KB
testcase_24 AC 97 ms
91,052 KB
testcase_25 AC 95 ms
90,992 KB
testcase_26 AC 96 ms
90,928 KB
testcase_27 AC 97 ms
90,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0