Submission #696624

#TimeUsernameProblemLanguageResultExecution timeMemory
696624minhnhatnoeAutići (COCI22_autici)C++14
50 / 50
16 ms1312 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; signed main(){ cin.tie(0)->sync_with_stdio(0); int n; cin >> n; vector<int> a(n); for (int i=0; i<n; i++) cin >> a[i]; cout << accumulate(a.begin(), a.end(), 0LL) + (*min_element(a.begin(), a.end()) * (n-2LL)) << "\n"; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...