백준1966
-
백준 1966번 : 프린터 큐 (Python, 파이썬) - 자료구조 큐(Deque)카테고리 없음 2019. 1. 14. 23:19
https://www.acmicpc.net/problem/196612345678910111213141516171819202122T = int(input())for _ in range(T): NM = list(map(int,input().split(' '))) N = NM[0] M = NM[1] imp = list(map(int,input().split(' '))) judge = [0 for _ in range(N)] judge[M] = 'T' cnt = 0 if len(imp) == N: while True: if imp[0] == max(imp): cnt += 1 if judge[0] == 'T': print(cnt) break else: imp.pop(0) judge.pop(0) else: imp.a..