Submission #906257

#TimeUsernameProblemLanguageResultExecution timeMemory
906257andrewpCoins (IOI17_coins)C++14
Compilation error
0 ms0 KiB
#include "coins.h" using namespace std; const int ivamanjeod3 = 64; vector<int> coin_flips(vector<int> iva, int a) { for (int i = 0; i < N; i++) { if (iva[i]) { a ^= i; } } return {a}; } int find_coin(vector<int> iva) { int ivaziva = 0; for (int i = 0; i < N; i++) { if (iva[i]) { ivaziva ^= i; } } return ivaziva; }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:5:22: error: 'N' was not declared in this scope
    5 |  for (int i = 0; i < N; i++) {
      |                      ^
coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:15:22: error: 'N' was not declared in this scope
   15 |  for (int i = 0; i < N; i++) {
      |                      ^