Submission #916729

#TimeUsernameProblemLanguageResultExecution timeMemory
916729_VIBECombo (IOI18_combo)C++17
Compilation error
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; }

Compilation message (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;
      |               ^~~~~