結果
| 問題 | No.3196 Unique Nickname |
| コンテスト | |
| ユーザー |
SPD_9X2
|
| 提出日時 | 2025-07-12 03:11:20 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 64 ms / 2,000 ms |
| + 158µs | |
| コード長 | 376 bytes |
| 記録 | |
| コンパイル時間 | 237 ms |
| コンパイル使用メモリ | 95,468 KB |
| 実行使用メモリ | 79,064 KB |
| 最終ジャッジ日時 | 2026-07-13 04:39:20 |
| 合計ジャッジ時間 | 2,770 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
N = int(input())
dic = {}
S = []
T = []
for i in range(N):
s,t = input().split()
if s not in dic:
dic[s] = 0
dic[s] += 1
if t not in dic:
dic[t] = 0
dic[t] += 1
S.append(s)
T.append(t)
ans = "Yes"
for s,t in zip(S,T):
if dic[s] == 1 or dic[t] == 1:
pass
else:
ans = "No"
break
print (ans)
SPD_9X2