제출 #393110

#제출 시각아이디문제언어결과실행 시간메모리
393110JimmyZJXCoins (IOI17_coins)C++14
컴파일 에러
0 ms0 KiB
#include <iostream> #include <fstream> #include <algorithm> #include <cstring> #include <climits> #include <cassert> #include <tuple> #include <queue> #include <stack> #include <vector> #include <map> #include <set> #include <string> #include <unordered_set> #include <unordered_map> using namespace std; typedef long long LL; typedef vector<int> Vi; typedef vector<LL> VL; typedef vector<bool> Vb; typedef vector<vector<int>> Vii; #define forR(i, n) for (int i = 0; i < (n); i++) Vi coin_flips(Vi b, int c) { int r = find_coin(b); int k = c ^ r; return Vi{ k }; } int find_coin(Vi b) { int r = 0; forR(i, 64) { if (b[i] == 1) { r ^= i; } } return r; } #ifdef TEST_LOCAL int main() { auto result = coin_flips(Vi{ 5, 1, 1, 3, 3, 5 }, 3); return 0; } #endif

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

coins.cpp: In function 'Vi coin_flips(Vi, int)':
coins.cpp:28:10: error: 'find_coin' was not declared in this scope
   28 |  int r = find_coin(b);
      |          ^~~~~~~~~