1966 프린터 큐 문제풀이 #include #include using namespace std; void fast_io(void) { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } int main(void) { fast_io(); int t; cin >> t; while (t--) { int n, m; int cnt = 0; queue q; priority_queue p; cin >> n >> m; for (int i = 0; i > tmp; q.push({i, tmp}); p.push(tmp); } while (!q.empty()) { int idx = q.front().first;..