Submission #864227

#TimeUsernameProblemLanguageResultExecution timeMemory
864227abcvuitunggioCoins (IOI17_coins)C++17
Compilation error
0 ms0 KiB
#include "coins.h" #include <vector> #define vector<int> V using namespace std; V coin_flips(V b, int c) { for (int i=0;i<64;i++) c^=b[i]*i; return {c}; } int find_coin(V b) { return coin_flips(b,0)[0]; }

Compilation message (stderr)

coins.cpp:3:9: warning: ISO C++11 requires whitespace after the macro name
    3 | #define vector<int> V
      |         ^~~~~~
coins.cpp:5:1: error: 'V' does not name a type
    5 | V coin_flips(V b, int c) {
      | ^
coins.cpp:10:15: error: 'int find_coin' redeclared as different kind of entity
   10 | int find_coin(V b) {
      |               ^
In file included from coins.cpp:1:
coins.h:4:5: note: previous declaration 'int find_coin(std::vector<int>)'
    4 | int find_coin(std::vector<int> b);
      |     ^~~~~~~~~
coins.cpp:10:15: error: 'V' was not declared in this scope
   10 | int find_coin(V b) {
      |               ^