제출 #1275486

#제출 시각아이디문제언어결과실행 시간메모리
1275486abyfu콤보 (IOI18_combo)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; #define ll long long vector<string> rt; int nn; void bt(string r, int u){ if (u == nn){ rt.pb(r); } else { for (int i = 0; i < u; i++){ bt(r + char(i + 'A'), u + 1); } } } string guess_sequence(int n){ nn = n; if (n <= 3){ bt("", 0); for (auto i : rt){ if (press(i) == n){ return i; } } } }

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

combo.cpp: In function 'void bt(std::string, int)':
combo.cpp:10:12: error: 'class std::vector<std::__cxx11::basic_string<char> >' has no member named 'pb'
   10 |         rt.pb(r);
      |            ^~
combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:31:1: warning: control reaches end of non-void function [-Wreturn-type]
   31 | }
      | ^