-
[백준 문제풀이] 얼렁뚱땅 18115번 카드 놓기 풀이얼렁뚱땅 백준 문제풀이 2022. 5. 19. 11:24
https://www.acmicpc.net/problem/18115 from collections import deque n = int(input()) choice_array = list(map(int,input().split())) answer = deque(range(1,n+1)) first = deque() for i in range(len(answer)) : what = answer.popleft() method = choice_array.pop() if method == 1 : first.appendleft(what) elif method == 2 : first.insert(1,what) elif method == 3 : first.append(what) print(*first)
'얼렁뚱땅 백준 문제풀이' 카테고리의 다른 글
[백준 문제풀이] 얼렁뚱땅 2146번 다리만들기 풀이 (0) 2022.05.20 [백준 문제풀이] 얼렁뚱땅 2428번 표절 풀이 (0) 2022.05.20 [백준 문제풀이] 얼렁뚱땅 2567 색종이_2 풀이 (0) 2022.05.18 [백준 문제풀이] 얼렁뚱땅 2563번 색종이 풀이 (0) 2022.05.17 [백준 문제풀이] 얼렁뚱땅 2417번 정수 제곱근 풀이 (0) 2022.05.17