結果
| 問題 | No.3196 Unique Nickname |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-08-04 14:15:41 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 560 bytes |
| コンパイル時間 | 371 ms |
| コンパイル使用メモリ | 82,624 KB |
| 実行使用メモリ | 63,280 KB |
| 最終ジャッジ日時 | 2025-08-04 14:15:44 |
| 合計ジャッジ時間 | 2,621 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
n = int(input())
s, t = [], []
for _ in range(n):
s_, t_ = input().split()
s.append(s_)
t.append(t_)
for i in range(n):
sflag = True
for j in range(n):
if i == j:
continue
if s[i] == s[j] or s[i] == t[j]:
sflag = False
break
tflag = True
for j in range(n):
if i == j:
continue
if t[i] == s[j] or t[i] == t[j]:
tflag = False
break
if sflag == False and tflag == False:
print("No")
break
else:
print("Yes")