結果

問題 No.610 区間賞(Section Award)
ユーザー RyutoRyuto
提出日時 2017-12-12 21:20:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 146 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 471 ms
コンパイル使用メモリ 82,216 KB
実行使用メモリ 117,232 KB
最終ジャッジ日時 2024-05-08 05:17:59
合計ジャッジ時間 6,069 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,096 KB
testcase_01 AC 35 ms
52,480 KB
testcase_02 AC 36 ms
51,968 KB
testcase_03 AC 36 ms
52,480 KB
testcase_04 AC 37 ms
51,712 KB
testcase_05 AC 34 ms
52,352 KB
testcase_06 AC 40 ms
58,112 KB
testcase_07 AC 35 ms
52,864 KB
testcase_08 AC 39 ms
59,264 KB
testcase_09 AC 38 ms
58,240 KB
testcase_10 AC 38 ms
58,624 KB
testcase_11 AC 38 ms
58,752 KB
testcase_12 AC 36 ms
52,224 KB
testcase_13 AC 42 ms
59,008 KB
testcase_14 AC 38 ms
58,368 KB
testcase_15 AC 38 ms
58,496 KB
testcase_16 AC 39 ms
58,496 KB
testcase_17 AC 38 ms
58,368 KB
testcase_18 AC 38 ms
58,368 KB
testcase_19 AC 59 ms
75,904 KB
testcase_20 AC 133 ms
110,592 KB
testcase_21 AC 54 ms
71,680 KB
testcase_22 AC 95 ms
108,032 KB
testcase_23 AC 50 ms
67,840 KB
testcase_24 AC 65 ms
77,824 KB
testcase_25 AC 48 ms
65,408 KB
testcase_26 AC 79 ms
93,056 KB
testcase_27 AC 141 ms
110,080 KB
testcase_28 AC 118 ms
104,704 KB
testcase_29 AC 94 ms
104,064 KB
testcase_30 AC 113 ms
106,240 KB
testcase_31 AC 85 ms
91,120 KB
testcase_32 AC 119 ms
104,576 KB
testcase_33 AC 54 ms
70,656 KB
testcase_34 AC 146 ms
112,176 KB
testcase_35 AC 89 ms
96,640 KB
testcase_36 AC 127 ms
107,776 KB
testcase_37 AC 118 ms
116,332 KB
testcase_38 AC 59 ms
74,880 KB
testcase_39 AC 131 ms
110,464 KB
testcase_40 AC 138 ms
110,208 KB
testcase_41 AC 132 ms
110,304 KB
testcase_42 AC 132 ms
110,592 KB
testcase_43 AC 130 ms
110,648 KB
testcase_44 AC 112 ms
101,376 KB
testcase_45 AC 133 ms
110,248 KB
testcase_46 AC 132 ms
110,592 KB
testcase_47 AC 107 ms
117,232 KB
testcase_48 AC 102 ms
112,640 KB
testcase_49 AC 103 ms
104,820 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