#include #include #include using namespace std; string solution(string code) { bool mode = false;//0 int a = 0; string ret; for (int j = 0; j < code.size(); j++) { //'1'인지 판단하기 //mode 전환시키기 if (code[j] == '1') { a++; if (a % 2 == 1) { mode = true; } else if (a % 2 == 0) { mode = false; } } //mode조건에 맞게 ret에 추가하기 else { if (mode == false) { if (j % 2 == 0) { ret += code[j]; } } if (mode == true) ..