結果
| 問題 |
No.380 悪の台本
|
| コンテスト | |
| ユーザー |
taba
|
| 提出日時 | 2017-05-19 20:58:14 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 727 bytes |
| コンパイル時間 | 6,399 ms |
| コンパイル使用メモリ | 246,344 KB |
| 最終ジャッジ日時 | 2025-01-05 00:25:12 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 4 WA * 4 |
ソースコード
#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;
}
taba