結果

問題 No.610 区間賞(Section Award)
ユーザー 👑 rin204rin204
提出日時 2022-02-12 22:23:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 344 ms / 2,000 ms
コード長 422 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 87,100 KB
実行使用メモリ 117,888 KB
最終ジャッジ日時 2023-09-11 10:56:27
合計ジャッジ時間 12,552 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,376 KB
testcase_01 AC 75 ms
71,228 KB
testcase_02 AC 73 ms
71,264 KB
testcase_03 AC 75 ms
71,428 KB
testcase_04 AC 75 ms
71,480 KB
testcase_05 AC 75 ms
71,560 KB
testcase_06 AC 82 ms
75,844 KB
testcase_07 AC 77 ms
71,244 KB
testcase_08 AC 82 ms
76,048 KB
testcase_09 AC 76 ms
71,404 KB
testcase_10 AC 79 ms
75,772 KB
testcase_11 AC 80 ms
75,880 KB
testcase_12 AC 76 ms
71,532 KB
testcase_13 AC 81 ms
75,688 KB
testcase_14 AC 81 ms
75,856 KB
testcase_15 AC 81 ms
75,748 KB
testcase_16 AC 82 ms
75,832 KB
testcase_17 AC 80 ms
75,748 KB
testcase_18 AC 76 ms
71,140 KB
testcase_19 AC 110 ms
79,372 KB
testcase_20 AC 254 ms
101,700 KB
testcase_21 AC 99 ms
76,772 KB
testcase_22 AC 190 ms
95,824 KB
testcase_23 AC 97 ms
76,736 KB
testcase_24 AC 125 ms
84,040 KB
testcase_25 AC 92 ms
76,752 KB
testcase_26 AC 150 ms
89,756 KB
testcase_27 AC 253 ms
101,504 KB
testcase_28 AC 234 ms
102,204 KB
testcase_29 AC 178 ms
93,912 KB
testcase_30 AC 211 ms
99,020 KB
testcase_31 AC 145 ms
90,172 KB
testcase_32 AC 238 ms
98,864 KB
testcase_33 AC 99 ms
76,632 KB
testcase_34 AC 252 ms
101,724 KB
testcase_35 AC 162 ms
90,916 KB
testcase_36 AC 256 ms
101,280 KB
testcase_37 AC 213 ms
98,704 KB
testcase_38 AC 109 ms
79,412 KB
testcase_39 AC 263 ms
102,004 KB
testcase_40 AC 256 ms
101,824 KB
testcase_41 AC 254 ms
101,932 KB
testcase_42 AC 256 ms
101,932 KB
testcase_43 AC 255 ms
102,012 KB
testcase_44 AC 276 ms
101,160 KB
testcase_45 AC 344 ms
117,516 KB
testcase_46 AC 331 ms
117,888 KB
testcase_47 AC 226 ms
101,328 KB
testcase_48 AC 209 ms
98,660 KB
testcase_49 AC 222 ms
101,692 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
C = [0] * n
for i, a in enumerate(A, 1): C[a - 1] = i
A = C
B = list(map(int, input().split()))
C = [0] * n
for i, a in enumerate(B, 1): C[a - 1] = i
B = C
ab = [(a, b, i) for i, (a, b) in enumerate(zip(A, B), 1)]
ab.sort(key = lambda x:x[1])
ans = []
max_ = 0
for a, b, i in ab:
    if a > max_:
        ans.append(i)
        max_ = a
ans.sort()
print(*ans, sep="\n")
0