분류 전체보기
-
10866) 덱 c++백준코딩일기 2020. 11. 4. 20:04
문제 ) www.acmicpc.net/problem/10866 2164번: 카드2 N장의 카드가 있다. 각각의 카드는 차례로 1부터 N까지의 번호가 붙어 있으며, 1번 카드가 제일 위에, N번 카드가 제일 아래인 상태로 순서대로 카드가 놓여 있다. 이제 다음과 같은 동작을 카드가 www.acmicpc.net 풀이 ) 코드 ) #include #include using namespace std; int N; string cmd; deque dq; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> N ; while( N-- ) { cin >> cmd; int num = 0; if(cmd == "push_front"){ cin ..