# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1266445 | canhnam357 | Autići (COCI22_autici) | C++20 | 13 ms | 1096 KiB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
vector<long long> a(n);
for (long long &i : a) cin >> i;
sort(a.begin(), a.end());
cout << accumulate(a.begin(), a.end(), 0LL) + (n - 2) * a[0];
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |