Submission #16491

# Submission time Handle Problem Language Result Execution time Memory
16491 2015-08-26T12:01:07 Z eaststar Game (IOI14_game) C++14
Compilation error
0 ms 0 KB
int a[1500];
void initialize(int n){}
int hasEdge(int u, =int v){return ++a[u=u>v?u:v]==u;}

Compilation message

game.cpp:3:20: error: expected identifier before ‘=’ token
 int hasEdge(int u, =int v){return ++a[u=u>v?u:v]==u;}
                    ^
game.cpp:3:21: error: expected primary-expression before ‘int’
 int hasEdge(int u, =int v){return ++a[u=u>v?u:v]==u;}
                     ^
game.cpp:3:21: error: expected ‘,’ or ‘...’ before ‘int’
game.cpp: In function ‘int hasEdge(int, int)’:
game.cpp:3:43: error: ‘v’ was not declared in this scope
 int hasEdge(int u, =int v){return ++a[u=u>v?u:v]==u;}
                                           ^
game.cpp:3:53: warning: control reaches end of non-void function [-Wreturn-type]
 int hasEdge(int u, =int v){return ++a[u=u>v?u:v]==u;}
                                                     ^