Submission #1108141

#TimeUsernameProblemLanguageResultExecution timeMemory
1108141MingyuanzGame (IOI14_game)C++14
Compilation error
0 ms0 KiB
int N,a[1551]; void initialize(int n) N=n; int hasEdge(int u,int v) return (++a[u])==N-1 || (++a[v])==N-1;

Compilation message (stderr)

game.cpp:2:24: error: expected initializer before 'N'
    2 | void initialize(int n) N=n;
      |                        ^
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:3:33: error: expected identifier before '(' token
    3 | int hasEdge(int u,int v) return (++a[u])==N-1 || (++a[v])==N-1;
      |                                 ^
game.cpp:3:26: error: named return values are no longer supported
    3 | int hasEdge(int u,int v) return (++a[u])==N-1 || (++a[v])==N-1;
      |                          ^~~~~~
game.cpp:3:63: error: expected '{' at end of input
    3 | int hasEdge(int u,int v) return (++a[u])==N-1 || (++a[v])==N-1;
      |                                                               ^
game.cpp:3:63: warning: no return statement in function returning non-void [-Wreturn-type]