結果
| 問題 |
No.2268 NGワード回避
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-04-14 21:29:52 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 735 bytes |
| コンパイル時間 | 1,847 ms |
| コンパイル使用メモリ | 176,600 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-10 12:13:38 |
| 合計ジャッジ時間 | 9,246 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 52 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
unsigned long long xor64() {
static unsigned long long x
= (unsigned long long)(chrono::duration_cast<chrono::nanoseconds>(
chrono::high_resolution_clock::now().time_since_epoch()).count())
* 10150724397891781847ULL;
x ^= x << 7;
return x ^= x >> 9;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<string> a(n);
for(auto &&s : a) cin >> s;
sort(a.begin(), a.end());
string ans(n, '?');
auto f = [&](){
for(int i = 0; i < n; i++){
ans[i] = xor64() % 2 + 'a';
}
};
while(binary_search(a.begin(), a.end(), ans)) f();
cout << ans << '\n';
}