結果
| 問題 |
No.233 めぐるはめぐる (3)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-12-10 22:50:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 943 bytes |
| コンパイル時間 | 1,006 ms |
| コンパイル使用メモリ | 104,960 KB |
| 実行使用メモリ | 13,696 KB |
| 最終ジャッジ日時 | 2024-09-19 20:46:20 |
| 合計ジャッジ時間 | 5,847 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 2 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <deque>
#include <cstdio>
#include <set>
#include <map>
#include <bitset>
#include <stack>
#include <cctype>
using namespace std;
set<string> st;
string c[6] = { "","n","b","m","g","r" };
string v[6] = { "i","a","a","e","u","u" };
vector<int> vec = { 0,1,2,3,4,5 }, vec1 = { 0,1,2,3,4,5 };
int main() {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
st.insert(s);
}
if (st.find("inabameguru") == st.end()) {
cout << "inabameguru" << endl;
return 0;
}
while (next_permutation(vec.begin(), vec.end())) {
while (next_permutation(vec1.begin(), vec1.end())) {
string ans = "";
for (int i = 0; i < 6; i++) {
ans += c[vec[i]];
ans += v[vec1[i]];
}
if (st.find(ans) == st.end()) {
cout << ans << endl;
return 0;
}
}
}
}