답안 #917232

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
917232 2024-01-27T13:56:10 Z MateiKing80 Mean (info1cup19_mean) C++17
0 / 100
0 ms 348 KB
#include <bits/stdc++.h>

using namespace std;

using ll = long long;
#define int ll

priority_queue<int> pq;

signed main()
{
    int n, a;
    cin >> n;
    for(int i = 1; i <= n; i ++)
        cin >> a, pq.push(-a);
    while(pq.size() > 1)
    {
        int x = pq.top();
        pq.pop();
        int y = pq.top();
        pq.pop();
        pq.push(-((- x - y) / 2));
    }
    cout << -pq.top();
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -