結果

問題 No.938 賢人を探せ
ユーザー maspymaspy
提出日時 2019-12-03 14:58:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 263 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 10,680 KB
実行使用メモリ 13,772 KB
最終ジャッジ日時 2023-08-21 03:33:34
合計ジャッジ時間 1,677 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
13,692 KB
testcase_01 AC 16 ms
7,864 KB
testcase_02 AC 16 ms
7,768 KB
testcase_03 AC 15 ms
7,864 KB
testcase_04 AC 15 ms
7,952 KB
testcase_05 AC 15 ms
7,772 KB
testcase_06 AC 15 ms
7,772 KB
testcase_07 AC 15 ms
7,780 KB
testcase_08 AC 26 ms
11,240 KB
testcase_09 AC 26 ms
11,392 KB
testcase_10 AC 15 ms
7,820 KB
testcase_11 AC 31 ms
13,772 KB
testcase_12 AC 26 ms
11,212 KB
testcase_13 AC 26 ms
11,032 KB
testcase_14 AC 25 ms
11,148 KB
testcase_15 AC 26 ms
11,052 KB
testcase_16 AC 26 ms
11,220 KB
testcase_17 AC 26 ms
11,120 KB
testcase_18 AC 25 ms
11,216 KB
testcase_19 AC 26 ms
11,188 KB
testcase_20 AC 26 ms
11,116 KB
testcase_21 AC 25 ms
11,224 KB
testcase_22 AC 36 ms
13,728 KB
権限があれば一括ダウンロードができます

ソースコード

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