結果

問題 No.1868 Teleporting Cyanmond
ユーザー tassei903tassei903
提出日時 2022-03-11 21:31:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 517 bytes
コンパイル時間 411 ms
コンパイル使用メモリ 87,084 KB
実行使用メモリ 91,184 KB
最終ジャッジ日時 2023-10-14 06:21:55
合計ジャッジ時間 4,391 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,156 KB
testcase_01 AC 77 ms
71,240 KB
testcase_02 AC 75 ms
70,912 KB
testcase_03 AC 98 ms
88,988 KB
testcase_04 AC 93 ms
84,556 KB
testcase_05 AC 81 ms
76,304 KB
testcase_06 AC 84 ms
76,472 KB
testcase_07 AC 87 ms
81,268 KB
testcase_08 AC 85 ms
78,656 KB
testcase_09 AC 86 ms
80,592 KB
testcase_10 AC 95 ms
87,284 KB
testcase_11 AC 81 ms
76,144 KB
testcase_12 AC 85 ms
77,256 KB
testcase_13 AC 93 ms
81,612 KB
testcase_14 AC 102 ms
88,948 KB
testcase_15 AC 95 ms
84,440 KB
testcase_16 AC 85 ms
76,160 KB
testcase_17 AC 85 ms
77,012 KB
testcase_18 AC 105 ms
91,104 KB
testcase_19 AC 105 ms
91,064 KB
testcase_20 AC 105 ms
91,184 KB
testcase_21 AC 105 ms
91,004 KB
testcase_22 AC 104 ms
91,012 KB
testcase_23 AC 107 ms
91,096 KB
testcase_24 AC 106 ms
91,160 KB
testcase_25 AC 106 ms
90,816 KB
testcase_26 AC 104 ms
90,780 KB
testcase_27 AC 106 ms
91,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")

#######################################################################

N = ni()
R = [i-1 for i in na()]
i = 0
z = R[0]
ans = 1
while z < N-1:
    ans += 1
    k,i = i,z
    for j in range(k+1,i+1):
        z = max(z,R[j])
print(ans)
0