結果
問題 |
No.3196 Unique Nickname
|
ユーザー |
👑 ![]() |
提出日時 | 2025-07-12 03:11:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 42 ms / 2,000 ms |
コード長 | 376 bytes |
コンパイル時間 | 333 ms |
コンパイル使用メモリ | 81,924 KB |
実行使用メモリ | 52,480 KB |
最終ジャッジ日時 | 2025-07-12 03:11:23 |
合計ジャッジ時間 | 1,993 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)