結果
| 問題 |
No.2268 NGワード回避
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-04-14 21:31:08 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 462 bytes |
| コンパイル時間 | 1,822 ms |
| コンパイル使用メモリ | 196,460 KB |
| 最終ジャッジ日時 | 2025-02-12 06:22:16 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 51 WA * 1 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin>>N;
vector<string>A(N);
for(int i=0;i<N;i++){
cin>>A[i];
}
string ans="";
for(int i=0;i<N;i++){
ans.push_back('a');
}
for(int i=0;i<N;i++){
bool ok=true;
for(int j=0;j<N;j++){
if(A[i]==ans)ok=false;
}
if(ok){
cout<<ans<<'\n';
return 0;
}
ans[i]='b';
}
cout<<ans<<'\n';
}