結果

問題 No.938 賢人を探せ
ユーザー popketlepopketle
提出日時 2020-01-14 12:41:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 99 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 210 ms
コンパイル使用メモリ 10,776 KB
実行使用メモリ 20,412 KB
最終ジャッジ日時 2023-08-21 03:43:06
合計ジャッジ時間 2,554 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
20,412 KB
testcase_01 AC 15 ms
7,928 KB
testcase_02 AC 15 ms
7,800 KB
testcase_03 AC 15 ms
7,832 KB
testcase_04 AC 16 ms
7,980 KB
testcase_05 AC 15 ms
7,848 KB
testcase_06 AC 15 ms
7,828 KB
testcase_07 AC 15 ms
7,852 KB
testcase_08 AC 69 ms
13,988 KB
testcase_09 AC 71 ms
14,284 KB
testcase_10 AC 15 ms
7,984 KB
testcase_11 AC 85 ms
18,428 KB
testcase_12 AC 69 ms
13,844 KB
testcase_13 AC 69 ms
13,756 KB
testcase_14 AC 67 ms
13,764 KB
testcase_15 AC 67 ms
13,704 KB
testcase_16 AC 66 ms
13,772 KB
testcase_17 AC 66 ms
13,716 KB
testcase_18 AC 66 ms
13,680 KB
testcase_19 AC 65 ms
13,696 KB
testcase_20 AC 67 ms
13,564 KB
testcase_21 AC 67 ms
13,844 KB
testcase_22 AC 97 ms
20,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
AB=[list(map(str,input().split())) for _ in range(n)]

cheater,person=[],[]
for a,b in AB:
    cheater.append(a)
    person.append(b)
nocheater=set(person)-set(cheater)
# nocheater=sorted(set(nocheater),key=person.index)
# print(*nocheater,sep="\n")

for p in person:
    if p in nocheater:
        print(p)
        nocheater.remove(p)
0