結果

問題 No.610 区間賞(Section Award)
ユーザー GrayCoderGrayCoder
提出日時 2017-12-11 21:18:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 454 bytes
コンパイル時間 108 ms
コンパイル使用メモリ 10,952 KB
実行使用メモリ 32,640 KB
最終ジャッジ日時 2023-08-20 17:32:04
合計ジャッジ時間 5,825 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,784 KB
testcase_01 AC 13 ms
7,828 KB
testcase_02 AC 12 ms
7,860 KB
testcase_03 AC 12 ms
7,848 KB
testcase_04 AC 12 ms
7,864 KB
testcase_05 AC 13 ms
7,864 KB
testcase_06 AC 13 ms
8,352 KB
testcase_07 AC 13 ms
7,880 KB
testcase_08 AC 15 ms
8,360 KB
testcase_09 AC 13 ms
8,296 KB
testcase_10 AC 14 ms
8,444 KB
testcase_11 AC 13 ms
8,400 KB
testcase_12 AC 16 ms
7,792 KB
testcase_13 AC 13 ms
8,404 KB
testcase_14 AC 13 ms
8,332 KB
testcase_15 AC 13 ms
8,328 KB
testcase_16 AC 13 ms
8,304 KB
testcase_17 AC 12 ms
8,232 KB
testcase_18 AC 12 ms
7,788 KB
testcase_19 AC 35 ms
14,540 KB
testcase_20 AC 127 ms
32,640 KB
testcase_21 AC 30 ms
11,604 KB
testcase_22 AC 78 ms
22,632 KB
testcase_23 AC 22 ms
10,536 KB
testcase_24 AC 37 ms
15,804 KB
testcase_25 AC 18 ms
10,068 KB
testcase_26 AC 54 ms
20,432 KB
testcase_27 AC 135 ms
32,580 KB
testcase_28 AC 110 ms
28,368 KB
testcase_29 AC 75 ms
22,792 KB
testcase_30 AC 107 ms
27,908 KB
testcase_31 AC 61 ms
18,840 KB
testcase_32 AC 112 ms
32,424 KB
testcase_33 AC 27 ms
11,492 KB
testcase_34 AC 152 ms
32,092 KB
testcase_35 AC 67 ms
20,452 KB
testcase_36 AC 117 ms
32,520 KB
testcase_37 AC 104 ms
24,256 KB
testcase_38 AC 33 ms
14,724 KB
testcase_39 AC 130 ms
31,792 KB
testcase_40 AC 138 ms
31,756 KB
testcase_41 AC 131 ms
31,768 KB
testcase_42 AC 128 ms
32,216 KB
testcase_43 AC 127 ms
31,912 KB
testcase_44 AC 115 ms
23,664 KB
testcase_45 AC 140 ms
28,712 KB
testcase_46 AC 143 ms
28,660 KB
testcase_47 AC 80 ms
28,596 KB
testcase_48 AC 72 ms
24,296 KB
testcase_49 AC 82 ms
27,356 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    N = int(input())
    A = tuple(map(int, input().split()))
    B = tuple(map(int, input().split()))

    safe = []
    apnd_safe = safe.append
    out = set()
    apnd_out = out.add
    a = {j: i for i, j in enumerate(A)}
    for i, j in enumerate(B):
        k = a[j]
        if i <= k and j not in out:
            apnd_safe(j)
            for x in A[i:k]:
                apnd_out(x)

    safe.sort()
    print(*safe, sep='\n')

main()
0