結果
| 問題 |
No.3196 Unique Nickname
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-12 10:38:47 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 2,000 ms |
| コード長 | 438 bytes |
| コンパイル時間 | 313 ms |
| コンパイル使用メモリ | 11,904 KB |
| 実行使用メモリ | 10,240 KB |
| 最終ジャッジ日時 | 2025-07-12 10:38:49 |
| 合計ジャッジ時間 | 1,948 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
n = int(input())
st = [input().split() for _ in range(n)]
dic = {}
for i in range(n):
if st[i][0] not in dic:
dic[st[i][0]] = 1
else:
dic[st[i][0]] += 1
if st[i][1] not in dic:
dic[st[i][1]] = 1
else:
dic[st[i][1]] += 1
flag = True
for s, t in st:
if dic[s] == 1 or dic[t] == 1:
flag = True
else:
flag = False
break
print("Yes" if flag else "No")