# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
791127 | Username4132 | Autići (COCI22_autici) | C++14 | 10 ms | 1308 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<iostream>
using namespace std;
using ll = long long;
#define forn(i, n) for(int i=0; i<(int)n; ++i)
int a, n, mn=1000000010;
ll s;
int main(){
scanf("%d", &n);
forn(i, n){
scanf("%d", &a);
s+=a;
mn = min(mn, a);
}
printf("%lld\n", s + ((n-2)*((ll)mn)));
}
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... |