개발/알고리즘 & 자료구조
백준(BOJ) 1406번 에디터
#include #include #include using namespace std; int main() { string str; cin >> str; stackleft; stackright; //right에 str복사 for (int i = 0; i > t; //명령어 입력 for (int i = 0; i > order; if (order == 'L' && !left.empty()) { right.push(left.top()); left.pop(); } if (order == 'D' && !right.empty()) { left.push(right.top(..