結果

問題 No.610 区間賞(Section Award)
ユーザー okadukiokaduki
提出日時 2017-12-13 00:06:14
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 209 ms / 2,000 ms
コード長 313 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 23,656 KB
最終ジャッジ日時 2023-08-20 23:56:58
合計ジャッジ時間 5,737 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,852 KB
testcase_01 AC 15 ms
7,848 KB
testcase_02 AC 15 ms
7,944 KB
testcase_03 AC 15 ms
7,836 KB
testcase_04 AC 15 ms
7,756 KB
testcase_05 AC 16 ms
7,940 KB
testcase_06 AC 16 ms
8,240 KB
testcase_07 AC 15 ms
7,812 KB
testcase_08 AC 16 ms
8,196 KB
testcase_09 AC 15 ms
7,900 KB
testcase_10 AC 16 ms
8,348 KB
testcase_11 AC 16 ms
8,336 KB
testcase_12 AC 15 ms
7,764 KB
testcase_13 AC 16 ms
8,396 KB
testcase_14 AC 16 ms
8,240 KB
testcase_15 AC 16 ms
7,776 KB
testcase_16 AC 15 ms
7,908 KB
testcase_17 AC 15 ms
7,840 KB
testcase_18 AC 15 ms
7,772 KB
testcase_19 AC 34 ms
11,420 KB
testcase_20 AC 110 ms
23,148 KB
testcase_21 AC 27 ms
10,484 KB
testcase_22 AC 78 ms
18,308 KB
testcase_23 AC 22 ms
9,572 KB
testcase_24 AC 36 ms
11,728 KB
testcase_25 AC 20 ms
9,152 KB
testcase_26 AC 56 ms
15,308 KB
testcase_27 AC 111 ms
23,656 KB
testcase_28 AC 98 ms
21,740 KB
testcase_29 AC 72 ms
17,692 KB
testcase_30 AC 92 ms
20,424 KB
testcase_31 AC 53 ms
15,024 KB
testcase_32 AC 101 ms
22,424 KB
testcase_33 AC 26 ms
10,452 KB
testcase_34 AC 108 ms
23,116 KB
testcase_35 AC 58 ms
15,288 KB
testcase_36 AC 104 ms
22,828 KB
testcase_37 AC 89 ms
20,292 KB
testcase_38 AC 35 ms
11,676 KB
testcase_39 AC 113 ms
23,564 KB
testcase_40 AC 113 ms
23,604 KB
testcase_41 AC 112 ms
23,524 KB
testcase_42 AC 113 ms
23,604 KB
testcase_43 AC 115 ms
23,584 KB
testcase_44 AC 172 ms
20,552 KB
testcase_45 AC 205 ms
23,032 KB
testcase_46 AC 209 ms
23,464 KB
testcase_47 AC 96 ms
20,168 KB
testcase_48 AC 86 ms
20,052 KB
testcase_49 AC 97 ms
20,304 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