Submission #861671

#TimeUsernameProblemLanguageResultExecution timeMemory
861671cirnepqCoins (IOI17_coins)C++14
Compilation error
0 ms0 KiB
#include "coins.h" std::vector<int> coin_flips(std::vector<int> b, int c) { std::vector<int> flips(1); if (c==0) { if (b[0]==1) flips[0]=63; else flips[0]=1; } else { if (b[0]==0) flips[0]=63; else flip[0]=1; } return flips; } int find_coin(std::vector<int> b) { if (b[0] == 1){ return 0 } return 1 }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:11:8: error: 'flip' was not declared in this scope; did you mean 'flips'?
   11 |   else flip[0]=1;
      |        ^~~~
      |        flips
coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:19:17: error: expected ';' before '}' token
   19 |         return 0
      |                 ^
      |                 ;
   20 |     }
      |     ~            
coins.cpp:21:13: error: expected ';' before '}' token
   21 |     return 1
      |             ^
      |             ;
   22 | }
      | ~