結果

問題 No.380 悪の台本
ユーザー tabataba
提出日時 2017-05-19 20:58:14
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 727 bytes
コンパイル時間 6,507 ms
コンパイル使用メモリ 252,932 KB
実行使用メモリ 35,644 KB
最終ジャッジ日時 2023-08-06 20:18:20
合計ジャッジ時間 6,783 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 WA -
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 3 ms
4,380 KB
testcase_04 AC 10 ms
4,380 KB
testcase_05 AC 20 ms
4,380 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 31 ms
35,644 KB
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <cmath>
#include <cassert>
#include <random>
#include <vector>
#include <algorithm>
#include <array>
#include <functional>
#include <utility>
#include <regex>
#include <tuple>
#include <map>
#include <set>
#include <iostream>

using namespace std;

int main(){
	map<char,regex> re;
	re['g']=regex(R"(^.*[Nn][Yy][Oo][^A-Za-z0-9]{0,3}$)");
	re['t']=regex(R"(^.*[Nn][Yy][Uu][^A-Za-z0-9]{0,3}$)");
	re['b']=regex(R"(^.*[A-Za-z0-9].*$)");
	re['m']=regex(R"(^.*[Gg][Ee][Mm][Aa][^A-Za-z0-9]{0,3}$)");
	re['y']=regex(R"(^.*[Pp][Yy][Oo][^A-Za-z0-9]{0,3}$)");
	string s,name;
	while(cin>>name){
		getline(cin,s);
		puts(regex_match(s,re[name[2]])?"CORRECT (maybe)":"WRONG!");
	}
	return 0;
}
0