ログイン
新規登録
AtsuoCoder Petrozavodsk Contest 001
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 abe68764-a303-443b-87eb-cfdb12b47356
コード
#include <iostream> #include <regex> using namespace std; int main() { string s; string str1 = regex_replace(s, regex("A"), "P"); cout << str1 << endl; string str1 = regex_replace(s, regex("C"), "A"); cout << str1 << endl; //zzz-bbz string str1 = regex_replace(s, regex("P"), "C"); cout << str1 << endl; //zzz-bbz s.append("MAN");
結果
問題
点数
言語
結果
実行時間
メモリ
D - PACMAN
0
C++
WJ
0 ms
0 KiB
コンパイルエラー
Main.cpp: In function 'int main()': Main.cpp:9:16: error: redeclaration of 'std::string str1' 9 | string str1 = regex_replace(s, regex("C"), "A"); | ^~~~ Main.cpp:7:16: note: 'std::string str1' previously declared here 7 | string str1 = regex_replace(s, regex("A"), "P"); | ^~~~ Main.cpp:11:12: error: redeclaration of 'std::string str1' 11 | string str1 = regex_replace(s, regex("P"), "C"); | ^~~~ Main.cpp:7:16: note: 'std::string str1' previously declared here 7 | string str1 = regex_replace(s, regex("A"), "P"); | ^~~~ Main.cpp:13:25: error: expected '}' at end of input 13 | s.append("MAN"); | ^ Main.cpp:5:12: note: to match this '{' 5 | int main() { | ^