結果
| 問題 |
No.233 めぐるはめぐる (3)
|
| コンテスト | |
| ユーザー |
E31415926
|
| 提出日時 | 2017-02-21 21:11:23 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 761 bytes |
| コンパイル時間 | 2,141 ms |
| コンパイル使用メモリ | 174,596 KB |
| 実行使用メモリ | 13,568 KB |
| 最終ジャッジ日時 | 2024-12-30 15:04:52 |
| 合計ジャッジ時間 | 7,099 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 2 |
ソースコード
#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();
}
E31415926