結果

問題 No.938 賢人を探せ
ユーザー maspy
提出日時 2019-12-03 14:58:52
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 703 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 15,636 KB
最終ジャッジ日時 2024-12-14 11:47:04
合計ジャッジ時間 2,004 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read

_,*AB = read().decode('utf-8').split()
A = AB[::2]
B = AB[1::2]

se = set(A)
answer = []
for x in B:
    if x in se:
        continue
    se.add(x)
    answer.append(x)
    
if answer:
    print('\n'.join(map(str,answer)))
0