Submission #142765

#TimeUsernameProblemLanguageResultExecution timeMemory
142765thecodingwizard게임 (IOI14_game)C++11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "game.h" int ct[1500]; void initialize(int N) { F0R(i, N) ct[i] = 0; } int hasEdge(int u, int v) { return ++ct[max(u, v)] == max(u, v); }

Compilation message (stderr)

game.cpp: In function 'void initialize(int)':
game.cpp:6:9: error: 'i' was not declared in this scope
     F0R(i, N) ct[i] = 0;
         ^
game.cpp:6:5: error: 'F0R' was not declared in this scope
     F0R(i, N) ct[i] = 0;
     ^~~
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:9:17: error: 'max' was not declared in this scope
     return ++ct[max(u, v)] == max(u, v);
                 ^~~
game.cpp:9:17: note: suggested alternative:
In file included from /usr/include/c++/7/algorithm:62:0,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
                 from game.cpp:1:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note:   'std::max'
     max(initializer_list<_Tp> __l, _Compare __comp)
     ^~~