제출 #917232

#제출 시각아이디문제언어결과실행 시간메모리
917232MateiKing80Mean (info1cup19_mean)C++17
0 / 100
0 ms348 KiB
#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(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...