제출 #916729

#제출 시각아이디문제언어결과실행 시간메모리
916729_VIBE콤보 (IOI18_combo)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; string guess_sequence(int N){ //querying for first pos set<char> s={'A','X','B','Y'}; string ans; for(auto x:s){ if(press(to_string(x))==1){ ans+=x; s.erase(x);break; } } int val=1; for(int i=1;i<n;i++){ for(auto x:s){ ans+=x; if(press(ans)==val+1) break; ans.pop_back(); } } return ans; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:10:11: error: 'press' was not declared in this scope
   10 |        if(press(to_string(x))==1){
      |           ^~~~~
combo.cpp:17:18: error: 'n' was not declared in this scope
   17 |    for(int i=1;i<n;i++){
      |                  ^
combo.cpp:20:15: error: 'press' was not declared in this scope
   20 |            if(press(ans)==val+1) break;
      |               ^~~~~