[백준] 1966번 프린터 큐
·
백준 문제/자료구조
문제: 1966번: 프린터 큐 #include #include #include #include using namespace std;int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t; cin >> t; while (t-- > 0) { int n, m; // 문서의 개수, 궁금한 문서의 현재 위치(인덱스) cin >> n >> m; // first: 인덱스, second: 중요도 deque> docs; priority_queue importances; // 중요도를 최대힙으로 관리 for (int i = 0; i ..