結果
| 問題 | No.938 賢人を探せ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-06 11:54:46 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 394 bytes |
| 記録 | |
| コンパイル時間 | 332 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 31,536 KB |
| 最終ジャッジ日時 | 2026-05-29 07:15:21 |
| 合計ジャッジ時間 | 7,290 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | TLE * 1 -- * 20 |
ソースコード
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])