Submission #530254

#TimeUsernameProblemLanguageResultExecution timeMemory
530254IwanttobreakfreeAutići (COCI22_autici)C++98
50 / 50
42 ms2044 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...