結果

問題 No.233 めぐるはめぐる (3)
ユーザー ishizuishizu
提出日時 2015-06-29 16:59:38
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 970 bytes
コンパイル時間 601 ms
コンパイル使用メモリ 74,752 KB
実行使用メモリ 11,708 KB
最終ジャッジ日時 2023-09-22 04:26:26
合計ジャッジ時間 4,340 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
11,708 KB
testcase_01 AC 27 ms
5,860 KB
testcase_02 AC 15 ms
4,616 KB
testcase_03 AC 30 ms
6,132 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<cstdio>
#include<vector>
#include<queue>
#include<map>
#include<string>
#include<algorithm>
#include<functional>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define INF 1<<30
#define MP make_pair
#define mp make_pair
#define pb push_back
#define PB push_back
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define ll long long
#define ull unsigned long long

int main(){
	int n;cin>>n;
	vector<string> no(n);
	REP(i,n){
		cin>>no[i];
	}
	char c[]={'a','a','e','u','i','u'};
	char m[]={'n','b','m','g','r','~'};
	sort(c,c+6);
	sort(m,m+6);
	do{
		do{
			string s;
			REP(i,6){
				if(m[i]!='~')s+=m[i];
				s+=c[i];
			}
			bool f=true;
			REP(i,n) if(s==no[i]){f=false;break;}
			if(f){cout<<s<<endl;exit(0);}
		}while(next_permutation(m,m+5));
	}while(next_permutation(c,c+6));
	return 0;
}
0