結果

問題 No.610 区間賞(Section Award)
ユーザー zimphazimpha
提出日時 2017-12-10 00:08:14
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 153 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 1,677 ms
コンパイル使用メモリ 86,916 KB
実行使用メモリ 104,276 KB
最終ジャッジ日時 2023-08-20 05:26:57
合計ジャッジ時間 7,293 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,268 KB
testcase_01 AC 71 ms
71,152 KB
testcase_02 AC 72 ms
71,048 KB
testcase_03 AC 73 ms
71,100 KB
testcase_04 AC 74 ms
71,088 KB
testcase_05 AC 72 ms
70,896 KB
testcase_06 AC 76 ms
75,556 KB
testcase_07 AC 72 ms
71,284 KB
testcase_08 AC 73 ms
75,584 KB
testcase_09 AC 72 ms
70,884 KB
testcase_10 AC 75 ms
75,568 KB
testcase_11 AC 77 ms
75,692 KB
testcase_12 AC 73 ms
71,216 KB
testcase_13 AC 75 ms
75,512 KB
testcase_14 AC 76 ms
75,612 KB
testcase_15 AC 74 ms
75,492 KB
testcase_16 AC 73 ms
75,544 KB
testcase_17 AC 75 ms
75,592 KB
testcase_18 AC 71 ms
71,352 KB
testcase_19 AC 84 ms
77,988 KB
testcase_20 AC 113 ms
100,324 KB
testcase_21 AC 80 ms
76,308 KB
testcase_22 AC 100 ms
94,612 KB
testcase_23 AC 77 ms
76,128 KB
testcase_24 AC 85 ms
78,852 KB
testcase_25 AC 79 ms
76,120 KB
testcase_26 AC 91 ms
86,120 KB
testcase_27 AC 114 ms
100,124 KB
testcase_28 AC 110 ms
101,164 KB
testcase_29 AC 96 ms
92,028 KB
testcase_30 AC 106 ms
97,460 KB
testcase_31 AC 89 ms
85,760 KB
testcase_32 AC 109 ms
100,944 KB
testcase_33 AC 81 ms
76,080 KB
testcase_34 AC 116 ms
104,024 KB
testcase_35 AC 93 ms
87,380 KB
testcase_36 AC 112 ms
104,276 KB
testcase_37 AC 105 ms
97,268 KB
testcase_38 AC 81 ms
78,388 KB
testcase_39 AC 114 ms
100,664 KB
testcase_40 AC 116 ms
100,372 KB
testcase_41 AC 115 ms
100,696 KB
testcase_42 AC 113 ms
100,652 KB
testcase_43 AC 116 ms
100,648 KB
testcase_44 AC 138 ms
98,404 KB
testcase_45 AC 153 ms
104,124 KB
testcase_46 AC 152 ms
100,368 KB
testcase_47 AC 110 ms
100,396 KB
testcase_48 AC 108 ms
97,476 KB
testcase_49 AC 111 ms
101,136 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