Submission #575652

#TimeUsernameProblemLanguageResultExecution timeMemory
575652Trisanu_DasGame (IOI14_game)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "game.h" using namespace std; int initialize(int n){} int prev_q[1500]; int hasEdge(int u, int v) return ++prev_q[max(u, v)] == max(u, v);

Compilation message (stderr)

game.cpp:5:5: error: ambiguating new declaration of 'int initialize(int)'
    5 | int initialize(int n){}
      |     ^~~~~~~~~~
In file included from game.cpp:2:
game.h:4:6: note: old declaration 'void initialize(int)'
    4 | void initialize(int n);
      |      ^~~~~~~~~~
game.cpp: In function 'int initialize(int)':
game.cpp:5:23: warning: no return statement in function returning non-void [-Wreturn-type]
    5 | int initialize(int n){}
      |                       ^
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:9:34: error: expected identifier before '++' token
    9 | int hasEdge(int u, int v) return ++prev_q[max(u, v)] == max(u, v);
      |                                  ^~
game.cpp:9:27: error: named return values are no longer supported
    9 | int hasEdge(int u, int v) return ++prev_q[max(u, v)] == max(u, v);
      |                           ^~~~~~
game.cpp:9:66: error: expected '{' at end of input
    9 | int hasEdge(int u, int v) return ++prev_q[max(u, v)] == max(u, v);
      |                                                                  ^
game.cpp:9:66: warning: no return statement in function returning non-void [-Wreturn-type]