제출 #864226

#제출 시각아이디문제언어결과실행 시간메모리
864226abcvuitunggioCoins (IOI17_coins)C++17
컴파일 에러
0 ms0 KiB
#include "coins.h" #include <vector> #define vector <int> V using namespace std; V coin_flips(V b, int c) { for (int i=0;i<64;i++) c^=b[i]*i; return {c}; } int find_coin(V b) { return coin_flips(b,0)[0]; }

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

coins.cpp:5:1: error: 'V' does not name a type
    5 | V coin_flips(V b, int c) {
      | ^
coins.cpp:10:15: error: 'int find_coin' redeclared as different kind of entity
   10 | int find_coin(V b) {
      |               ^
In file included from coins.cpp:1:
coins.h:4:5: note: previous declaration 'int find_coin(std::vector<int>)'
    4 | int find_coin(std::vector<int> b);
      |     ^~~~~~~~~
coins.cpp:10:15: error: 'V' was not declared in this scope
   10 | int find_coin(V b) {
      |               ^