
[Python] 백준 #1966- 프린터 큐
·
코딩테스트/백준[Python]
문제 1966번: 프린터 큐 여러분도 알다시피 여러분의 프린터 기기는 여러분이 인쇄하고자 하는 문서를 인쇄 명령을 받은 ‘순서대로’, 즉 먼저 요청된 것을 먼저 인쇄한다. 여러 개의 문서가 쌓인다면 Queue 자료구조에 www.acmicpc.net 코드 My answer import sys input=sys.stdin.readline from collections import deque tc=int(input()) for _ in range(tc): n,m=map(int,input().split()) imp=deque(map(int,input().split())) doc=deque([i for i in range(n)]) i=1 m=doc[m] while(1): if(max(imp)==imp[0]): i..