結果
問題 | No.233 めぐるはめぐる (3) |
ユーザー | kimiyuki |
提出日時 | 2016-01-14 17:45:50 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 831 bytes |
コンパイル時間 | 669 ms |
コンパイル使用メモリ | 76,184 KB |
実行使用メモリ | 12,680 KB |
最終ジャッジ日時 | 2023-10-19 23:05:30 |
合計ジャッジ時間 | 4,987 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 91 ms
12,404 KB |
testcase_01 | AC | 53 ms
9,020 KB |
testcase_02 | AC | 24 ms
6,192 KB |
testcase_03 | AC | 67 ms
10,604 KB |
testcase_04 | AC | 105 ms
12,668 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | AC | 109 ms
12,668 KB |
testcase_08 | AC | 107 ms
12,668 KB |
testcase_09 | AC | 2 ms
4,348 KB |
testcase_10 | AC | 2 ms
4,348 KB |
testcase_11 | AC | 2 ms
4,348 KB |
testcase_12 | AC | 54 ms
9,020 KB |
testcase_13 | AC | 93 ms
12,668 KB |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <unordered_set> #define repeat(i,n) for (int i = 0; (i) < (n); ++(i)) using namespace std; int main() { int n; cin >> n; unordered_set<string> s; repeat (i,n) { string t; cin >> t; s.insert(t); } string vowels = "aaeiuu"; do { string consonants = "bgmnr"; do { string t; repeat (i, vowels.length() + consonants.length()) { t += (i % 2 ? consonants : vowels)[i / 2]; } if (not s.count(t)) { cout << t << endl; return 0; } } while (next_permutation(consonants.begin(), consonants.end())); } while (next_permutation(vowels.begin(), vowels.end())); cout << "NO" << endl; return 0; }