結果
| 問題 | No.938 賢人を探せ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-06 11:54:46 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 394 bytes |
| 記録 | |
| コンパイル時間 | 311 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 22,400 KB |
| 最終ジャッジ日時 | 2024-12-23 05:05:35 |
| 合計ジャッジ時間 | 49,365 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 TLE * 15 |
ソースコード
n = int(input())
ans = [[],[]]
s = 0
for a in range(n):
cheat, p = input().split()
if p not in ans[0]:
ans[0].append(p)
ans[1].append(0)
if cheat not in ans[0]:
ans[0].append(cheat)
ans[1].append(-1)
else:
index = ans[0].index(cheat)
ans[1][index] = -1
for a in range(len(ans[1])):
if ans[1][a] == 0:
print(ans[0][a])