https://www.acmicpc.net/problem/5957 5957번: Cleaning the Dishes Bessie and Canmuu are teaming up to wash the massive pile of N (1 > N; int num = 1; stack washed; stack finished; int C, D; while(cin >> C >> D){ if(C == 1){ while(D--){ washed.push(num++); } }else{ while(D--){ finished.push(washed.top()); washed.pop(); } } } while(!finished.empty()){ cout