Submission #637472

#TimeUsernameProblemLanguageResultExecution timeMemory
637472as111Coins (IOI17_coins)C++14
Compilation error
0 ms0 KiB
#include <coins.h> #include <vector> using namespace std; vector<int> coin_flips(int b[], int c) { int A = 0; for (int i = 0; i < 64; i++) { A = A ^ (i * b[i]); } vector<int> flips; flips.push_back(c ^ A); } int find_coin(int b[]) { int X = 0; for (int i = 0; i < 64; i++) { X = X ^ (i * b[i]); } return X; }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(int*, int)':
coins.cpp:12:1: warning: no return statement in function returning non-void [-Wreturn-type]
   12 | }
      | ^
/usr/bin/ld: /tmp/cckMgWPE.o: in function `main':
grader.cpp:(.text.startup+0x3a5): undefined reference to `coin_flips(std::vector<int, std::allocator<int> >, int)'
/usr/bin/ld: grader.cpp:(.text.startup+0x997): undefined reference to `find_coin(std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status