結果

問題 No.610 区間賞(Section Award)
ユーザー GrayCoderGrayCoder
提出日時 2017-12-11 21:18:19
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 204 ms / 2,000 ms
コード長 454 bytes
コンパイル時間 356 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 34,960 KB
最終ジャッジ日時 2024-05-07 23:56:57
合計ジャッジ時間 7,524 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,752 KB
testcase_01 AC 28 ms
10,880 KB
testcase_02 AC 28 ms
10,880 KB
testcase_03 AC 29 ms
10,752 KB
testcase_04 AC 31 ms
10,880 KB
testcase_05 AC 31 ms
10,752 KB
testcase_06 AC 27 ms
10,880 KB
testcase_07 AC 28 ms
10,752 KB
testcase_08 AC 27 ms
11,008 KB
testcase_09 AC 28 ms
10,880 KB
testcase_10 AC 27 ms
11,008 KB
testcase_11 AC 28 ms
11,008 KB
testcase_12 AC 27 ms
10,752 KB
testcase_13 AC 28 ms
10,880 KB
testcase_14 AC 29 ms
10,880 KB
testcase_15 AC 28 ms
10,880 KB
testcase_16 AC 30 ms
11,008 KB
testcase_17 AC 27 ms
10,880 KB
testcase_18 AC 27 ms
10,752 KB
testcase_19 AC 56 ms
16,716 KB
testcase_20 AC 173 ms
34,152 KB
testcase_21 AC 49 ms
13,792 KB
testcase_22 AC 116 ms
24,928 KB
testcase_23 AC 41 ms
12,928 KB
testcase_24 AC 60 ms
18,068 KB
testcase_25 AC 34 ms
12,416 KB
testcase_26 AC 80 ms
22,180 KB
testcase_27 AC 182 ms
34,488 KB
testcase_28 AC 148 ms
30,464 KB
testcase_29 AC 108 ms
24,796 KB
testcase_30 AC 140 ms
30,300 KB
testcase_31 AC 95 ms
20,496 KB
testcase_32 AC 159 ms
33,232 KB
testcase_33 AC 45 ms
13,756 KB
testcase_34 AC 204 ms
34,592 KB
testcase_35 AC 97 ms
22,352 KB
testcase_36 AC 164 ms
33,320 KB
testcase_37 AC 151 ms
26,328 KB
testcase_38 AC 57 ms
16,968 KB
testcase_39 AC 185 ms
34,704 KB
testcase_40 AC 188 ms
34,708 KB
testcase_41 AC 185 ms
34,804 KB
testcase_42 AC 181 ms
34,960 KB
testcase_43 AC 174 ms
34,752 KB
testcase_44 AC 179 ms
25,532 KB
testcase_45 AC 200 ms
30,680 KB
testcase_46 AC 204 ms
30,768 KB
testcase_47 AC 112 ms
30,576 KB
testcase_48 AC 105 ms
26,360 KB
testcase_49 AC 124 ms
30,468 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