Submission #1133358

#TimeUsernameProblemLanguageResultExecution timeMemory
1133358jpfr12Mean (info1cup19_mean)C++20
0 / 100
0 ms320 KiB
#include <bits/stdc++.h> typedef long long ll; typedef unsigned long long int ull; using namespace std; const ll MOD = (ll)1e9+7; int MAXN = 1e6; //classes //global int N; vector<ll> vec; int main(){ ios_base::sync_with_stdio(false); cin.tie(0); //ifstream fin("hps.in"); //ofstream fout("hps.out"); //stop cin >> N; vec.assign(N, 0); priority_queue<ll, vector<ll>, greater<ll>> PQ; for(ll& i: vec){ cin >> i; PQ.push(i); } while(PQ.size() >= 2){ ll one = PQ.top(); PQ.pop(); ll two = PQ.top(); PQ.pop(); one = (one+two)/2; PQ.push(one); } cout << PQ.top() << '\n'; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...