제출 #370107

#제출 시각아이디문제언어결과실행 시간메모리
370107AdamGS콤보 (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define rep(a, b) for(int a = 0; a < (b); ++a) string guess_sequence(int N) { string ans=""; char T[4]={'A','B','X','Y'}; rep(i, 4) { int p=press(ans+T[i]); if(p==1) { ans+=T[i]; break; } } rep(i, N-1) { rep(j, 4) { if(T[j]!=ans[0]) { int p=press(ans+T[j]); if(p==i+2) { ans+=T[j]; break; } } } } return ans; } int main() { }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:15: error: 'press' was not declared in this scope
    8 |         int p=press(ans+T[i]);
      |               ^~~~~
combo.cpp:17:23: error: 'press' was not declared in this scope
   17 |                 int p=press(ans+T[j]);
      |                       ^~~~~