結果

問題 No.1868 Teleporting Cyanmond
ユーザー shiomusubi496shiomusubi496
提出日時 2021-11-23 10:00:37
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 221 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 10,720 KB
実行使用メモリ 19,768 KB
最終ジャッジ日時 2023-10-13 19:33:27
合計ジャッジ時間 2,736 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,868 KB
testcase_01 AC 15 ms
7,808 KB
testcase_02 AC 15 ms
7,896 KB
testcase_03 AC 47 ms
17,260 KB
testcase_04 AC 44 ms
15,516 KB
testcase_05 AC 17 ms
8,492 KB
testcase_06 AC 22 ms
9,604 KB
testcase_07 AC 31 ms
12,604 KB
testcase_08 AC 25 ms
11,048 KB
testcase_09 AC 30 ms
12,324 KB
testcase_10 AC 48 ms
16,448 KB
testcase_11 AC 16 ms
8,204 KB
testcase_12 AC 23 ms
10,264 KB
testcase_13 AC 34 ms
13,120 KB
testcase_14 AC 58 ms
18,784 KB
testcase_15 AC 42 ms
14,832 KB
testcase_16 AC 20 ms
9,260 KB
testcase_17 AC 23 ms
10,200 KB
testcase_18 AC 72 ms
19,656 KB
testcase_19 AC 72 ms
19,596 KB
testcase_20 AC 71 ms
19,648 KB
testcase_21 AC 76 ms
19,728 KB
testcase_22 AC 73 ms
19,676 KB
testcase_23 AC 96 ms
19,708 KB
testcase_24 AC 97 ms
19,704 KB
testcase_25 AC 97 ms
19,748 KB
testcase_26 AC 100 ms
19,652 KB
testcase_27 AC 101 ms
19,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
R = list(map(int, input().split()))
ans = 0
now = 0
while R[now] != N:
    nxt = 0
    for i in range(now, R[now]):
        if R[nxt] < R[i]:
            nxt = i
    now = nxt
    ans += 1
print(ans + 1)
0