結果
| 問題 | No.3196 Unique Nickname |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-11 21:25:42 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 76 ms / 2,000 ms |
| + 1µs | |
| コード長 | 271 bytes |
| 記録 | |
| コンパイル時間 | 270 ms |
| コンパイル使用メモリ | 95,984 KB |
| 実行使用メモリ | 79,324 KB |
| 最終ジャッジ日時 | 2026-07-13 03:03:38 |
| 合計ジャッジ時間 | 3,006 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
from collections import defaultdict
N=int(input())
S=[]
T=[]
ST=defaultdict(int)
for _ in range(N):
s,t=input().split()
S.append(s)
T.append(t)
ST[s]+=1
ST[t]+=1
for s,t in zip(S,T):
if ST[s]>=2 and ST[t]>=2:
exit(print("No"))
print("Yes")