Submission #1220960

#TimeUsernameProblemLanguageResultExecution timeMemory
1220960FaresSTHCombo (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include"bits/stdc++.h" // #include"combo.h" using namespace std; using ll=long long; #define S second #define F first int q; void qry(string s){ q=press(s); } string guess_sequence(int n){ string s; qry("AB"); if(q==1)qry("A"),s+=(q?'A':'B'); else qry("X"),s+=(q?'X':'Y'); string val[3];q=0; for(char c:"ABXY")if(c!=s[0])val[q++]=c; for(int i=1;i<n-1;i++){ qry(s+val[0]+s+val[1]+val[0]+s+val[1]+val[1]+s+val[1]+val[2]); if(q==0)s+=val[2]; else if(q==1)s+=val[0]; else s+=val[1]; } qry(val[0]+val[1]); if(q==1)qry(val[0]),s+=val[q]; else s+=val[2]; return s; }

Compilation message (stderr)

combo.cpp: In function 'void qry(std::string)':
combo.cpp:9:10: error: 'press' was not declared in this scope
    9 |        q=press(s);
      |          ^~~~~