結果

問題 No.610 区間賞(Section Award)
ユーザー yuppe19 😺yuppe19 😺
提出日時 2017-12-10 14:07:15
言語 Python2
(2.7.18)
結果
AC  
実行時間 253 ms / 2,000 ms
コード長 473 bytes
コンパイル時間 566 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 24,584 KB
最終ジャッジ日時 2023-08-20 09:52:34
合計ジャッジ時間 6,980 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,920 KB
testcase_01 AC 11 ms
5,908 KB
testcase_02 AC 11 ms
5,884 KB
testcase_03 AC 12 ms
5,852 KB
testcase_04 AC 11 ms
5,836 KB
testcase_05 AC 12 ms
5,912 KB
testcase_06 AC 12 ms
6,040 KB
testcase_07 AC 11 ms
5,848 KB
testcase_08 AC 12 ms
5,996 KB
testcase_09 AC 11 ms
5,924 KB
testcase_10 AC 12 ms
5,908 KB
testcase_11 AC 12 ms
5,904 KB
testcase_12 AC 11 ms
6,020 KB
testcase_13 AC 13 ms
6,128 KB
testcase_14 AC 12 ms
6,108 KB
testcase_15 AC 12 ms
5,972 KB
testcase_16 AC 12 ms
5,932 KB
testcase_17 AC 12 ms
6,044 KB
testcase_18 AC 11 ms
5,992 KB
testcase_19 AC 43 ms
8,272 KB
testcase_20 AC 172 ms
17,396 KB
testcase_21 AC 32 ms
7,388 KB
testcase_22 AC 117 ms
13,408 KB
testcase_23 AC 23 ms
6,904 KB
testcase_24 AC 49 ms
8,580 KB
testcase_25 AC 19 ms
6,476 KB
testcase_26 AC 82 ms
11,188 KB
testcase_27 AC 169 ms
17,268 KB
testcase_28 AC 151 ms
16,000 KB
testcase_29 AC 110 ms
13,100 KB
testcase_30 AC 145 ms
15,304 KB
testcase_31 AC 77 ms
10,624 KB
testcase_32 AC 162 ms
16,616 KB
testcase_33 AC 32 ms
7,428 KB
testcase_34 AC 173 ms
17,436 KB
testcase_35 AC 85 ms
11,212 KB
testcase_36 AC 167 ms
16,708 KB
testcase_37 AC 140 ms
15,024 KB
testcase_38 AC 44 ms
8,276 KB
testcase_39 AC 178 ms
17,684 KB
testcase_40 AC 180 ms
17,680 KB
testcase_41 AC 177 ms
17,708 KB
testcase_42 AC 179 ms
17,640 KB
testcase_43 AC 178 ms
17,660 KB
testcase_44 AC 207 ms
21,164 KB
testcase_45 AC 249 ms
23,892 KB
testcase_46 AC 253 ms
24,584 KB
testcase_47 AC 148 ms
15,428 KB
testcase_48 AC 138 ms
14,936 KB
testcase_49 AC 152 ms
15,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python2
# -*- coding: utf-8 -*-
# †
n = int(raw_input())
a = map(lambda x: int(x)-1, raw_input().split())
b = map(lambda x: int(x)-1, raw_input().split())
x = [None] * n # x[i] := 人 i の順位
for i, p in enumerate(a):
    x[p] = i

maxi = -1
resArr = []
for i, p in enumerate(b):
    j = x[p] # i 位になった人 p は j 位だった
    if j > maxi:
        resArr.append(p+1)
        maxi = j
resArr.sort()
res = '\n'.join(map(str, resArr))
print res
0