Submission #526674

#TimeUsernameProblemLanguageResultExecution timeMemory
526674joelauAutići (COCI22_autici)C++14
50 / 50
19 ms1156 KiB
#include <bits/stdc++.h> using namespace std; long long N,A[100005]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> N; long long total = 0; for (long long i = 0; i < N; ++i) { cin >> A[i]; total += A[i]; } sort(A,A+N); cout << total + (N-2) * A[0]; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...