結果
| 問題 |
No.3196 Unique Nickname
|
| コンテスト | |
| ユーザー |
Cafe1942
|
| 提出日時 | 2025-07-11 21:23:57 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,167 bytes |
| コンパイル時間 | 911 ms |
| コンパイル使用メモリ | 112,500 KB |
| 実行使用メモリ | 19,280 KB |
| 最終ジャッジ日時 | 2025-07-11 21:24:05 |
| 合計ジャッジ時間 | 7,280 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 19 |
ソースコード
#include <iostream>
#include <iomanip>//小数点出力用
//cout << fixed << setprecision(10) << ans;
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <unordered_map>
using ll = long long;
using namespace std;
#define modPHash (ll)((1LL<<61)-1)
#define modP (ll)998244353
bool chkrng0idx(int pos, int sup) { return (0 <= pos && pos < sup); }
int clk4(int num) { return (num - 2) * (num % 2); }
void yn(bool tf) { cout << (tf ? "Yes\n" : "No\n"); }
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
int N;
cin >> N;
string S[101], T[101];
for (int i = 0;i < N;i++) {
cin >> S[i] >> T[i];
}
bool ok = 1;
for (int i = 0;i < N;i++) {
bool sok = 1, tok = 1;
for (int j = 0;j < N;i++) {
if (i == j)continue;
if (S[i] == S[j])sok = 0;
if (S[i] == T[j])sok = 0;
}
for (int j = 0;j < N;i++) {
if (i == j)continue;
if (T[i] == S[j])tok = 0;
if (T[i] == T[j])tok = 0;
}
if (sok == 0 && tok == 0)ok = 0;
}
yn(ok);
}
Cafe1942