結果
| 問題 | No.233 めぐるはめぐる (3) | 
| コンテスト | |
| ユーザー |  E31415926 | 
| 提出日時 | 2017-02-21 21:12:54 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 190 ms / 1,000 ms | 
| コード長 | 761 bytes | 
| コンパイル時間 | 2,124 ms | 
| コンパイル使用メモリ | 174,616 KB | 
| 実行使用メモリ | 13,696 KB | 
| 最終ジャッジ日時 | 2024-12-30 15:05:03 | 
| 合計ジャッジ時間 | 5,599 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 11 | 
ソースコード
#include<bits/stdc++.h>
#define int long long
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#define INF (1ll<<60)
typedef pair<int, int> pii;
#define FI first
#define SE second
#define all(s) s.begin(),s.end()
#define RREP(i,n) for(int i=(n)-1;i>=0;--i)
int N;
set<string> S;
void rekkyo() {
	string bo = "aaeiuu";
	string si = "bgmnr";
	do {
		do {
			rep(i,5)
			{
				string t;
				rep(j,5)
				{
					if (i == j)
						t += bo[5];
					t += si[j];
					t += bo[j];
				}
				if (!S.count(t)) {
					cout << t << endl;
					return;
				}
			}
		} while (next_permutation(all(si)));
	} while (next_permutation(all(bo)));
	cout << "NO" << endl;
}
signed main() {
	cin >> N;
	rep(i,N)
	{
		string s;
		cin >> s;
		S.insert(s);
	}
	rekkyo();
}
            
            
            
        