結果
問題 |
No.3196 Unique Nickname
|
ユーザー |
![]() |
提出日時 | 2025-07-11 21:23:01 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 43 ms / 2,000 ms |
コード長 | 216 bytes |
コンパイル時間 | 254 ms |
コンパイル使用メモリ | 82,504 KB |
実行使用メモリ | 55,740 KB |
最終ジャッジ日時 | 2025-07-11 21:23:07 |
合計ジャッジ時間 | 1,812 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
from collections import Counter n = int(input()) st = [input().split() for _ in range(n)] c = Counter() for s, t in st: c[s] += 1 c[t] += 1 print('Yes' if all(c[s] == 1 or c[t] == 1 for s, t in st) else 'No')