Submission #610864

#TimeUsernameProblemLanguageResultExecution timeMemory
610864ak2006Autići (COCI22_autici)C++14
50 / 50
52 ms2136 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; long long sum = 0; vector<long long>d(n + 1); for (int i = 1;i<=n;i++)cin>>d[i]; sort(d.begin() + 1,d.end()); for (int i = 2;i<=n;i++) sum += d[i] + d[1]; cout<<sum; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...