結果

問題 No.233 めぐるはめぐる (3)
ユーザー kotatsugamekotatsugame
提出日時 2020-03-02 22:10:47
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 540 bytes
コンパイル時間 899 ms
コンパイル使用メモリ 82,904 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-21 22:52:45
合計ジャッジ時間 5,168 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
5,376 KB
testcase_01 AC 53 ms
5,376 KB
testcase_02 AC 31 ms
5,376 KB
testcase_03 AC 56 ms
5,376 KB
testcase_04 AC 75 ms
5,376 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 74 ms
5,376 KB
testcase_08 AC 74 ms
5,376 KB
testcase_09 AC 10 ms
5,376 KB
testcase_10 AC 10 ms
5,376 KB
testcase_11 AC 10 ms
5,376 KB
testcase_12 AC 51 ms
5,376 KB
testcase_13 AC 74 ms
5,376 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main()
      | ^~~~

ソースコード

diff #

#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;
}
0