Submission #1013511

#TimeUsernameProblemLanguageResultExecution timeMemory
1013511Error404Game (IOI14_game)C++17
Compilation error
0 ms0 KiB
#include "bits/stdc++.h" using namespace std; #define ll long long #define f first #define s second #define pi pair<ll,ll> #define vi vector<ll> #define vpi vector<pi> #define pb push_back #define INF 1e18 #define endl '\n' //#define int ll #define pii pair<pi,ll> const int MAX = 1e5+1; vpi g[MAX]; ll dis[MAX][2]; int hold[MAX]; void initialize(int n){ } int hasEdge(int u,int v){ if(u >v) swap(u,v); hold[u]++: if(hold[u]==u) return 1; else{ return 0; } }

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:27:12: error: expected ';' before ':' token
   27 |   hold[u]++:
      |            ^
      |            ;
game.cpp:29:5: error: 'else' without a previous 'if'
   29 |     else{
      |     ^~~~