1715
[골4] 1715 - 카드 정렬하기
#include #include #include #pragma region 입출력 속도향상 #define FAST_IO() \ {\ ios::sync_with_stdio(false);\ cin.tie(NULL); \ cout.tie(NULL); \ }\ #pragma endregion using namespace std; int main() { FAST_IO(); int n, ans = 0; cin >> n; priority_queue pq; if (n == 1) { cout tmp; pq.push(tmp); } while (!pq.empty()) { int sum = 0; sum += pq.top(); pq.pop(); if (!pq.empty()) { sum += pq.top(); pq.pop(); ..