# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
895787 | Isam | Autići (COCI22_autici) | C++17 | 11 ms | 1860 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
constexpr int sz = 100005;
int n;
int d[sz];
signed main(){
ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
cin >> n;
long long sm(0);
int mn{(int)1e9 + 7};
for(register int i = 1; i <= n; ++i){
cin >> d[i];
sm += d[i];
mn = min(mn, d[i]);
}
sm += 1ll * (n - 2) * mn;
cout << sm << '\n';
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |