結果

問題 No.1868 Teleporting Cyanmond
ユーザー nariyelnariyel
提出日時 2022-03-11 22:03:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 455 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 10,700 KB
実行使用メモリ 19,148 KB
最終ジャッジ日時 2023-10-14 07:12:36
合計ジャッジ時間 6,530 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
9,016 KB
testcase_01 AC 22 ms
8,884 KB
testcase_02 AC 22 ms
8,804 KB
testcase_03 AC 47 ms
18,456 KB
testcase_04 AC 41 ms
16,224 KB
testcase_05 AC 23 ms
9,372 KB
testcase_06 AC 27 ms
10,380 KB
testcase_07 AC 33 ms
13,552 KB
testcase_08 AC 30 ms
11,724 KB
testcase_09 AC 31 ms
13,152 KB
testcase_10 AC 45 ms
17,496 KB
testcase_11 AC 22 ms
9,040 KB
testcase_12 AC 28 ms
11,192 KB
testcase_13 AC 287 ms
13,928 KB
testcase_14 AC 1,118 ms
19,148 KB
testcase_15 AC 514 ms
15,620 KB
testcase_16 AC 37 ms
9,964 KB
testcase_17 AC 72 ms
10,896 KB
testcase_18 TLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin
import threading
threading.stack_size(10 ** 8)

def main():
    N, *R = map(int, stdin.read().split())
    i = R[0]
    ztm = []
    ztm.append(i)
    res = 0
    while i != N:
        i = max(R[:i])
        if i in ztm:
            maxindex = rindex(R[:i])
            R[maxindex] = 0
        else:
            res += 1
    print(res+1)


if __name__ == "__main__":
    t = threading.Thread(target=main)
    t.start()
    t.join()

0