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>
#include <vector>
#include <algorithm>
using namespace std;
#define int long long
signed main(){
int n,ans=0;
cin>>n;
vector<int> v(n);
for(int& i:v)cin>>i;
sort(v.begin(),v.end());
for(int i=1;i<n;i++)ans+=v[0]+v[i];
cout<<ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |