https://www.acmicpc.net/problem/28278 28278번: 스택 2 첫째 줄에 명령의 수 N이 주어진다. (1 ≤ N ≤ 1,000,000) 둘째 줄부터 N개 줄에 명령이 하나씩 주어진다. 출력을 요구하는 명령은 하나 이상 주어진다. www.acmicpc.net 풀이 #include int arr[1000000]; int main() { int commend, o, n;// 명령, 배열원소, 테스트케이스 scanf("%d", &n); int j = 0; for (int i = 0; i < n; i++) { scanf("%d", &commend); switch (commend) { case 1: scanf("%d", &o); arr[j] = o; j++; break; case 2: ..