Submission #333074

#TimeUsernameProblemLanguageResultExecution timeMemory
333074gouravkhungerCoins (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; for(int i=0;i<64;i++) { if(i==c&&b[c]==0) flips.push_back(i); else { if(b[i]==1) flips.push_back(i); else continue; } } if(flips.size()==0){ flips.push_back(c); } return flips; } int find_coin(std::vector<int> b) { return find(b.begin(), b.end(), 1); }

Compilation message (stderr)

coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:19:12: error: 'find' was not declared in this scope
   19 |     return find(b.begin(), b.end(), 1);
      |            ^~~~