Submission #1111173

#TimeUsernameProblemLanguageResultExecution timeMemory
1111173huantranAutići (COCI22_autici)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long int; const int maxn = 2e5 + 5; const int oo = 1e9 + 7; const ll inf = 1e18; int main() { ios_base::sync_with_stdio(0); cin.tie(0), cout.tie(0); int n; cin >> n; vector<int> a(n); long long sum = 0; for (int i = 0; i < n; i++) cin >> a[i], sum += a[i]; sort(a.begin(), a.end()); cout << sum + 1LL * (n - 2) * a[0] }

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:21:39: error: expected ';' before '}' token
   21 |     cout << sum + 1LL * (n - 2) * a[0]
      |                                       ^
      |                                       ;
   22 | }
      | ~