제출 #899530

#제출 시각아이디문제언어결과실행 시간메모리
899530SuPythony콤보 (IOI18_combo)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; string guess_sequence(int n) { vector<string> c={"A","B","X","Y"}; string ans=""; for (int i=0; i<4; i++) { if (press(c[i])) { ans+=c[i]; c.erase(c.begin()+i); break; } } int l=1; while (l<n) { for (auto i: c) { if (press(ans+i)>l) { ans+=i; l++; } } } return ans; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:13: error: 'press' was not declared in this scope
    8 |         if (press(c[i])) {
      |             ^~~~~
combo.cpp:17:17: error: 'press' was not declared in this scope
   17 |             if (press(ans+i)>l) {
      |                 ^~~~~