結果

問題 No.610 区間賞(Section Award)
ユーザー RyutoRyuto
提出日時 2017-12-12 21:20:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 169 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 87,016 KB
実行使用メモリ 114,984 KB
最終ジャッジ日時 2023-08-20 23:31:20
合計ジャッジ時間 8,380 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,408 KB
testcase_01 AC 69 ms
71,236 KB
testcase_02 AC 70 ms
71,088 KB
testcase_03 AC 69 ms
71,200 KB
testcase_04 AC 70 ms
71,360 KB
testcase_05 AC 70 ms
71,252 KB
testcase_06 AC 74 ms
75,688 KB
testcase_07 AC 70 ms
71,156 KB
testcase_08 AC 74 ms
75,928 KB
testcase_09 AC 73 ms
75,936 KB
testcase_10 AC 75 ms
75,824 KB
testcase_11 AC 74 ms
75,844 KB
testcase_12 AC 71 ms
71,400 KB
testcase_13 AC 75 ms
75,756 KB
testcase_14 AC 77 ms
75,704 KB
testcase_15 AC 75 ms
75,828 KB
testcase_16 AC 75 ms
75,820 KB
testcase_17 AC 73 ms
76,012 KB
testcase_18 AC 72 ms
75,940 KB
testcase_19 AC 94 ms
83,168 KB
testcase_20 AC 161 ms
111,000 KB
testcase_21 AC 88 ms
78,280 KB
testcase_22 AC 130 ms
108,632 KB
testcase_23 AC 86 ms
77,136 KB
testcase_24 AC 97 ms
84,416 KB
testcase_25 AC 85 ms
76,580 KB
testcase_26 AC 113 ms
98,268 KB
testcase_27 AC 168 ms
110,600 KB
testcase_28 AC 154 ms
106,980 KB
testcase_29 AC 130 ms
105,956 KB
testcase_30 AC 143 ms
101,876 KB
testcase_31 AC 110 ms
96,448 KB
testcase_32 AC 150 ms
106,040 KB
testcase_33 AC 86 ms
78,340 KB
testcase_34 AC 169 ms
114,984 KB
testcase_35 AC 117 ms
101,272 KB
testcase_36 AC 157 ms
108,384 KB
testcase_37 AC 144 ms
102,024 KB
testcase_38 AC 91 ms
82,544 KB
testcase_39 AC 162 ms
110,860 KB
testcase_40 AC 167 ms
112,528 KB
testcase_41 AC 166 ms
110,776 KB
testcase_42 AC 160 ms
110,616 KB
testcase_43 AC 158 ms
109,488 KB
testcase_44 AC 150 ms
103,864 KB
testcase_45 AC 161 ms
107,544 KB
testcase_46 AC 161 ms
106,600 KB
testcase_47 AC 135 ms
106,540 KB
testcase_48 AC 128 ms
102,452 KB
testcase_49 AC 133 ms
106,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python

n = int(input().strip())
sorder1 = [int(x) for x in input().split()]
sorder = {y: x for x, y in enumerate(sorder1)}
forder = [int(x) for x in input().split()]

ans = []
exc = set()
for i, j in enumerate(forder):
    tmp = sorder[j]
    if i <= tmp and j not in exc:
        ans.append(j)
        for k in sorder1[i:tmp]:
            exc.add(k)

for i in sorted(ans):
    print(i)
0