Algorithm
[백준] 10845번 큐 파이썬 문제풀이
from collections import deque import sys que = deque() def push(X): que.append(X) def pop(): if len(que) == 0: return -1 return que.popleft() def size(): return len(que) def empty(): if len(que) == 0: return 1 return 0 def front(): if len(que) == 0: return -1 return que[0] def back(): if len(que) == 0: return -1 return que[-1] result = [] N = int(sys.stdin.readline().rstrip()) for _ in range(N):..
2022. 3. 1. 21:58