結果

問題 No.610 区間賞(Section Award)
ユーザー zimphazimpha
提出日時 2017-12-10 00:08:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 130 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 104,008 KB
最終ジャッジ日時 2024-05-07 12:48:55
合計ジャッジ時間 5,251 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
51,840 KB
testcase_01 AC 42 ms
51,712 KB
testcase_02 AC 41 ms
51,712 KB
testcase_03 AC 43 ms
51,712 KB
testcase_04 AC 42 ms
51,840 KB
testcase_05 AC 41 ms
51,840 KB
testcase_06 AC 45 ms
58,368 KB
testcase_07 AC 41 ms
51,968 KB
testcase_08 AC 47 ms
58,240 KB
testcase_09 AC 42 ms
52,352 KB
testcase_10 AC 46 ms
58,496 KB
testcase_11 AC 45 ms
57,984 KB
testcase_12 AC 41 ms
51,712 KB
testcase_13 AC 46 ms
58,368 KB
testcase_14 AC 45 ms
58,112 KB
testcase_15 AC 45 ms
57,984 KB
testcase_16 AC 46 ms
57,984 KB
testcase_17 AC 45 ms
58,112 KB
testcase_18 AC 41 ms
52,224 KB
testcase_19 AC 60 ms
68,480 KB
testcase_20 AC 98 ms
102,144 KB
testcase_21 AC 51 ms
65,252 KB
testcase_22 AC 81 ms
89,216 KB
testcase_23 AC 48 ms
63,104 KB
testcase_24 AC 60 ms
69,248 KB
testcase_25 AC 52 ms
61,440 KB
testcase_26 AC 71 ms
78,336 KB
testcase_27 AC 94 ms
102,144 KB
testcase_28 AC 86 ms
96,892 KB
testcase_29 AC 74 ms
85,760 KB
testcase_30 AC 87 ms
93,184 KB
testcase_31 AC 67 ms
77,544 KB
testcase_32 AC 90 ms
97,920 KB
testcase_33 AC 50 ms
65,260 KB
testcase_34 AC 94 ms
101,888 KB
testcase_35 AC 66 ms
80,000 KB
testcase_36 AC 94 ms
100,992 KB
testcase_37 AC 79 ms
93,464 KB
testcase_38 AC 58 ms
68,352 KB
testcase_39 AC 95 ms
102,528 KB
testcase_40 AC 90 ms
102,272 KB
testcase_41 AC 95 ms
102,400 KB
testcase_42 AC 91 ms
102,400 KB
testcase_43 AC 91 ms
102,608 KB
testcase_44 AC 119 ms
102,036 KB
testcase_45 AC 129 ms
103,728 KB
testcase_46 AC 130 ms
104,008 KB
testcase_47 AC 87 ms
96,692 KB
testcase_48 AC 83 ms
93,452 KB
testcase_49 AC 88 ms
96,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
order = [0] * n
for i, x in enumerate(a):
  order[x - 1] = i
mx = -1
can = []
for x in b:
  if order[x - 1] > mx:
    can.append(x)
  mx = max(mx, order[x - 1])
can.sort()
for x in can:
  print(x)
0