結果

問題 No.610 区間賞(Section Award)
ユーザー okadukiokaduki
提出日時 2017-12-13 00:06:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 226 ms / 2,000 ms
コード長 313 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 25,076 KB
最終ジャッジ日時 2024-05-08 05:40:48
合計ジャッジ時間 5,645 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,752 KB
testcase_01 AC 28 ms
10,880 KB
testcase_02 AC 28 ms
10,752 KB
testcase_03 AC 28 ms
10,752 KB
testcase_04 AC 25 ms
10,752 KB
testcase_05 AC 25 ms
10,752 KB
testcase_06 AC 29 ms
10,752 KB
testcase_07 AC 27 ms
10,880 KB
testcase_08 AC 27 ms
10,880 KB
testcase_09 AC 29 ms
10,752 KB
testcase_10 AC 27 ms
10,880 KB
testcase_11 AC 26 ms
10,752 KB
testcase_12 AC 26 ms
10,752 KB
testcase_13 AC 27 ms
11,008 KB
testcase_14 AC 27 ms
11,008 KB
testcase_15 AC 27 ms
10,880 KB
testcase_16 AC 27 ms
10,752 KB
testcase_17 AC 27 ms
10,880 KB
testcase_18 AC 27 ms
10,752 KB
testcase_19 AC 45 ms
13,668 KB
testcase_20 AC 131 ms
24,608 KB
testcase_21 AC 40 ms
12,672 KB
testcase_22 AC 91 ms
19,608 KB
testcase_23 AC 35 ms
12,160 KB
testcase_24 AC 51 ms
14,080 KB
testcase_25 AC 33 ms
11,648 KB
testcase_26 AC 75 ms
17,160 KB
testcase_27 AC 130 ms
24,492 KB
testcase_28 AC 113 ms
22,832 KB
testcase_29 AC 95 ms
19,660 KB
testcase_30 AC 107 ms
21,580 KB
testcase_31 AC 68 ms
16,176 KB
testcase_32 AC 118 ms
22,860 KB
testcase_33 AC 39 ms
12,544 KB
testcase_34 AC 130 ms
24,468 KB
testcase_35 AC 76 ms
17,544 KB
testcase_36 AC 124 ms
23,124 KB
testcase_37 AC 105 ms
21,676 KB
testcase_38 AC 47 ms
13,824 KB
testcase_39 AC 129 ms
24,948 KB
testcase_40 AC 137 ms
25,000 KB
testcase_41 AC 132 ms
24,996 KB
testcase_42 AC 131 ms
24,996 KB
testcase_43 AC 137 ms
25,076 KB
testcase_44 AC 192 ms
22,084 KB
testcase_45 AC 226 ms
24,592 KB
testcase_46 AC 219 ms
23,952 KB
testcase_47 AC 121 ms
21,808 KB
testcase_48 AC 115 ms
21,608 KB
testcase_49 AC 113 ms
21,936 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
n = int(input())
xs = [int(x) for x in input().split()]
ys = [int(x) for x in input().split()]

ix = [0 for i in range(n+1)]
for (i,x) in enumerate(xs):
    ix[x] = i

a = -1
ans = []
for y in ys:
    if a <= ix[y]:
        a = ix[y]
        ans.append(y)
ans.sort()
for x in ans: print(x)
0