[백준] 알고리즘 1966번 - 프린터 큐 문제
#include using namespace std; queue qu; priority_queue pq; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int T; cin >> T; while (T--) { int n, m,cnt=0; cin >> n >> m; for (int i = 0; i > c; qu.push({ i, c }); pq.push(c); } while (!qu.empty()) { int index = qu.front().first; int value = qu.front().second; qu.pop(); if (pq.top() == value) { p..