結果
| 問題 |
No.3196 Unique Nickname
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-13 13:39:34 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 482 bytes |
| コンパイル時間 | 2,264 ms |
| コンパイル使用メモリ | 275,524 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-07-13 13:39:38 |
| 合計ジャッジ時間 | 3,267 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
int N;
string S[100],T[100];
signed main(){
cin.tie(0)->sync_with_stdio(0);
cin>>N;
rep(i,N)cin>>S[i]>>T[i];
rep(i,N){
bool ok=1;
rep(j,N){
if(i==j)continue;
if(S[i]==S[j]||S[i]==T[j])ok=0;
}
if(ok)continue;
rep(j,N){
if(i==j)continue;
if(T[i]==S[j]||T[i]==T[j]){
cout<<"No\n";
return 0;
}
}
}
cout<<"Yes\n";
}