結果

問題 No.2268 NGワード回避
ユーザー ortogawa
提出日時 2025-07-25 11:30:37
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 473 bytes
コンパイル時間 2,006 ms
コンパイル使用メモリ 200,836 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-07-25 11:30:43
合計ジャッジ時間 5,001 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 52
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#define int ll
#define fast_io cin.tie(0)->sync_with_stdio(0);
#define endl '\n'
typedef long long ll;

int32_t main() {
	fast_io;

	int n; cin >> n;
	set<string> st;
	for (int i = 0; i < n; i++) {
		string s; cin >> s;
		st.insert(s);
	}
	
	for (int i = 0; i <= n; i++) {
		string r;
		for (int j = 0, val = i; j < n; j++, val /= 2)
			r += 'a' + (val % 2);
		if (!st.count(r)) {
			cout << r << endl;
			return 0;
		}
	}

}
0