제출 #1187039

#제출 시각아이디문제언어결과실행 시간메모리
1187039North1304Coins (IOI17_coins)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "coins.h" using namespace std; // Arnavaz's move: flip one coin so that the new XOR‐parity equals c int coin_flips(const vector<int>& b, int c) { int P = 0; for (int i = 0; i < 64; i++) { if (b[i]) P ^= i; } // flip position return P ^ c; } // Shahrnaz's move: compute XOR of all tail‐positions to find c int find_coin(const vector<int>& b) { int P = 0; for (int i = 0; i < 64; i++) { if (b[i]) P ^= i; } return P; }

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/ccYNkVRY.o: in function `main':
grader.cpp:(.text.startup+0x3e2): undefined reference to `coin_flips(std::vector<int, std::allocator<int> >, int)'
/usr/bin/ld: grader.cpp:(.text.startup+0xb8a): undefined reference to `find_coin(std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status