제출 #570027

#제출 시각아이디문제언어결과실행 시간메모리
570027OrazBCombo (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> // #define N 100005 #define wr cout << "Continue debugging\n"; #define ll long long int #define pii pair <int, int> #define pb push_back #define ff first #define ss second using namespace std; string guess_sequence(int N){ string t = "ABXY", p = ""; int tr = 0, idx = 0; for (int i = 0; i < 3; i++){ p.clear(); p += t[i]; if (press(p)){tr = 1; idx = i; break;} } if (!tr){ p.clear(); p += t[3]; idx = 3; } string tt = ""; for (int i = 0; i < 4; i++) if (idx != i) tt += t[i]; for (int i = 1; i < N; i++){ for (int j = 0; j < 3; j++){ p += tt[j]; if (press(p) == i + 1) break; p.pop_back(); } } return p; } // int main () // { // }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:16:7: error: 'press' was not declared in this scope
   16 |   if (press(p)){tr = 1; idx = i; break;}
      |       ^~~~~
combo.cpp:28:8: error: 'press' was not declared in this scope
   28 |    if (press(p) == i + 1) break;
      |        ^~~~~