제출 #1150641

#제출 시각아이디문제언어결과실행 시간메모리
1150641daveleCoins (IOI17_coins)C++20
컴파일 에러
0 ms0 KiB
#include "coins.h" #include <bits/stdc++.h> using namespace std; std::vector<int> coin_flips(std::vector<int> b, int c) { int sumxor = c; for (int i=0; i<64; i++) if (b[i]) sumxor^=i; vector <int> ret; ret.pb(sumxor); } int find_coin(std::vector<int> b) { int sumxor = 0; for (int i=0; i<64; i++) if (b[i]) sumxor^=i; return sumxor; }

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

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:10:9: error: 'class std::vector<int>' has no member named 'pb'
   10 |     ret.pb(sumxor);
      |         ^~
coins.cpp:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^