Submission #1129899

#TimeUsernameProblemLanguageResultExecution timeMemory
1129899pedreitorzeldaCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; string guess_sequence(int N){ string ans; vector<char>possible = {'A','B','X','Y'}; for(int i=0;i<N;i++){ if(i==0){ for(int j=0;j<3;j++){ string q(N,possible[j]); int tmp = press(q); if(tmp==1){ ans+=possible[j]; break; } }if(ans.size()==i)ans+=possible[3]; }else{ for(int j=0;j<3;j++){ string q(N-i-1,ans[0]); string qu = ans+possible[j]+q; int tmp = press(qu); if(tmp==1){ ans+=possible[j]; break; } }if(ans.size()==i)ans+=possible[3]; } } return ans; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:10:27: error: 'press' was not declared in this scope
   10 |                 int tmp = press(q);
      |                           ^~~~~
combo.cpp:20:27: error: 'press' was not declared in this scope
   20 |                 int tmp = press(qu);
      |                           ^~~~~