結果
問題 |
No.3196 Unique Nickname
|
ユーザー |
![]() |
提出日時 | 2025-07-11 21:22:25 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 48 ms / 2,000 ms |
コード長 | 298 bytes |
コンパイル時間 | 172 ms |
コンパイル使用メモリ | 82,840 KB |
実行使用メモリ | 55,676 KB |
最終ジャッジ日時 | 2025-07-11 21:22:27 |
合計ジャッジ時間 | 1,862 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
n = int(input()) S = [list(map(str, input().split())) for _ in range(n)] from collections import defaultdict dict = defaultdict(int) for l, r in S: dict[l] += 1 dict[r] += 1 for l, r in S: if dict[l] > 1 and dict[r] > 1: break else: print("Yes") exit() print("No")