Algorithm 136

C++ 알고리즘 - 백준 1927 최소 힙 (우선순위 큐 오름/내림차순)

https://www.acmicpc.net/problem/1927 #include #define endl "\n"using namespace std;int main(void) { /************** C++ Init **************/ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); /************** C++ Init **************/ int input1, input2; priority_queue, greater> pq; cin >> input1; for (int i = 0; i > input2; if (input2 == 0) { if (pq.empty()) cout  우선순위 큐 내림차순 (기본값)pri..

Algorithm/백준 2025.01.09