結果
| 問題 |
No.610 区間賞(Section Award)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-12-11 12:59:37 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 423 bytes |
| コンパイル時間 | 527 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 37,732 KB |
| 最終ジャッジ日時 | 2024-11-30 11:36:41 |
| 合計ジャッジ時間 | 91,315 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 TLE * 29 |
ソースコード
def main():
N = int(input())
A = tuple(map(int, input().split()))
B = tuple(map(int, input().split()))
a = list(A)
award = []
apnd = award.append
if N == 1:
print(B[0])
return
for i, j in enumerate(B):
idx = A.index(j)
if i <= idx and j in a:
apnd(j)
a[i:idx] = [-1] * (idx - i)
for i in sorted(award):
print(i)
main()