Submission #917229

#TimeUsernameProblemLanguageResultExecution timeMemory
917229MateiKing80Mean (info1cup19_mean)C++14
0 / 100
1 ms600 KiB
#include <bits/stdc++.h> using namespace std; priority_queue<int> pq; int 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...