結果

問題 No.938 賢人を探せ
ユーザー brthyyjpbrthyyjp
提出日時 2020-11-24 11:30:05
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 263 bytes
コンパイル時間 996 ms
コンパイル使用メモリ 86,708 KB
実行使用メモリ 87,628 KB
最終ジャッジ日時 2023-10-01 00:50:52
合計ジャッジ時間 4,854 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 146 ms
87,292 KB
testcase_01 AC 71 ms
71,272 KB
testcase_02 AC 73 ms
71,256 KB
testcase_03 AC 70 ms
70,984 KB
testcase_04 AC 70 ms
71,340 KB
testcase_05 AC 72 ms
71,312 KB
testcase_06 AC 71 ms
71,276 KB
testcase_07 AC 69 ms
71,244 KB
testcase_08 AC 119 ms
80,824 KB
testcase_09 AC 117 ms
80,268 KB
testcase_10 AC 75 ms
71,240 KB
testcase_11 AC 124 ms
82,428 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 152 ms
87,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
S = set()
A = []
d = {}
for i in range(n):
    a, b = map(str, input().split())
    S.add(a)
    S.add(b)
    A.append(a)
    d[b] = i

for a in A:
    S.discard(a)

X = []
for x in S:
    X.append((d[x], x))
X.sort()
for _, x in X:
    print(x)
0