結果
| 問題 | No.3196 Unique Nickname |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-11 23:01:16 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 76 ms / 2,000 ms |
| + 526µs | |
| コード長 | 274 bytes |
| 記録 | |
| コンパイル時間 | 239 ms |
| コンパイル使用メモリ | 95,464 KB |
| 実行使用メモリ | 79,396 KB |
| 最終ジャッジ日時 | 2026-07-13 04:09:49 |
| 合計ジャッジ時間 | 3,079 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
from collections import defaultdict
n = int(input())
st = [list(input().split()) for i in range(n)]
dic = defaultdict(int)
for s,t in st:
dic[s] += 1
dic[t] += 1
for s,t in st:
if dic[s] == 1:
continue
if dic[t] == 1:
continue
print("No")
exit()
print("Yes")