結果
| 問題 |
No.233 めぐるはめぐる (3)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-03-02 22:10:47 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 540 bytes |
| コンパイル時間 | 834 ms |
| コンパイル使用メモリ | 83,012 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-13 21:19:23 |
| 合計ジャッジ時間 | 4,538 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 2 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
6 | main()
| ^~~~
ソースコード
#include<iostream>
#include<set>
#include<vector>
#include<algorithm>
using namespace std;
main()
{
set<string>S;
vector<char>A={'a','a','e','i','u','u'};
vector<char>B={'b','g','m','n','r'};
do{
do{
string now="";
for(int i=0;i<5;i++)now+=A[i],now+=B[i];
now+=A[5];
S.insert(now);
}while(next_permutation(B.begin(),B.end()));
}while(next_permutation(A.begin(),A.end()));
int N;
cin>>N;
for(;N--;)
{
string s;
cin>>s;
S.erase(s);
}
set<string>::iterator it=S.begin();
cout<<(it==S.end()?"NO":*it)<<endl;
}