Submission #1359593

#TimeUsernameProblemLanguageResultExecution timeMemory
1359593FZ_LaabidiBikeparking (EGOI24_bikeparking)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
signed main(){
    int n; cin >> n;
    vector<int> x(n), y(n);
    for(int i=0; i<n; i++)cin >> x[i];
    for(int i=0; i<n; i++)cin >> y[i];
    int u = 0, d = 0;
    if(n==1)cout << 0 << endl;
    else cout << (n-2)*x[0] << endl
}

Compilation message (stderr)

Main.cpp: In function 'int main()':
Main.cpp:10:36: error: expected ';' before '}' token
   10 |     else cout << (n-2)*x[0] << endl
      |                                    ^
      |                                    ;
   11 | }
      | ~