結果

問題 No.1868 Teleporting Cyanmond
ユーザー nariyelnariyel
提出日時 2022-03-11 22:03:45
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 455 bytes
コンパイル時間 258 ms
コンパイル使用メモリ 87,056 KB
実行使用メモリ 267,364 KB
最終ジャッジ日時 2023-10-14 07:12:59
合計ジャッジ時間 8,037 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 155 ms
85,532 KB
testcase_01 AC 159 ms
80,940 KB
testcase_02 AC 156 ms
80,836 KB
testcase_03 AC 177 ms
95,240 KB
testcase_04 AC 171 ms
91,032 KB
testcase_05 AC 164 ms
81,628 KB
testcase_06 AC 160 ms
82,968 KB
testcase_07 AC 168 ms
87,560 KB
testcase_08 AC 161 ms
84,864 KB
testcase_09 AC 166 ms
86,836 KB
testcase_10 AC 171 ms
93,976 KB
testcase_11 AC 151 ms
81,720 KB
testcase_12 AC 158 ms
84,268 KB
testcase_13 AC 294 ms
163,520 KB
testcase_14 AC 430 ms
184,200 KB
testcase_15 AC 306 ms
181,060 KB
testcase_16 AC 156 ms
82,296 KB
testcase_17 AC 167 ms
86,752 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