Submission #918548

#TimeUsernameProblemLanguageResultExecution timeMemory
918548AtabayRajabliCoins (IOI17_coins)C++17
Compilation error
0 ms0 KiB
#include "coins.h" std::vector<int> coin_flips(std::vector<int> b, int c) { for(int i = 0; i < 64; i++) { if(b[i]) { c ^= i; } } return c; } int find_coin(std::vector<int> b) { int r = 0; for(int i = 0; i < 64; i++) { if(b[i]) { r ^= i; } } return r; }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:11:12: error: could not convert 'c' from 'int' to 'std::vector<int>'
   11 |     return c;
      |            ^
      |            |
      |            int