제출 #527757

#제출 시각아이디문제언어결과실행 시간메모리
5277571neAutići (COCI22_autici)C++14
50 / 50
17 ms1860 KiB
#include<bits/stdc++.h> using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int n;cin>>n; vector<int64_t>arr(n); for (int i = 0;i<n;++i){ cin>>arr[i]; } int64_t ans = 0; sort(arr.begin(),arr.end()); for (int i = 1;i<n;++i){ ans+=arr[i] + arr[0]; } cout<<ans<<'\n'; return 0;}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...