Submission #873611

#TimeUsernameProblemLanguageResultExecution timeMemory
873611maxFedorchukCombo (IOI18_combo)C++14
0 / 100
0 ms344 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; /* int press(string p) { return 1; } */ string guess_sequence(int N) { /* string alsym[4]={"a","b","x","y"}; string pot[3]; int frs; if(press(alsym[0]+alsym[1])) { if(press(alsym[0])) { frs=0; pot[0]="b"; pot[1]="x"; pot[2]="y"; } else { frs=1; pot[0]="a"; pot[1]="x"; pot[2]="y"; } } else { if(press(alsym[2])) { frs=2; pot[0]="a"; pot[1]="b"; pot[2]="y"; } else { frs=3; pot[0]="a"; pot[1]="b"; pot[2]="x"; } } string res=alsym[frs]; for(int i=2;i<N;i++) { string zap=(res+pot[0]+pot[1])+(res+pot[0]+pot[2])+(res+pot[0]+pot[3])+(res+pot[1]+alsym[frs]); int rt=press(zap); if((res.size()+2)==rt) { res+=pot[0]; } else { if((res.size()+1)==rt) { res+=pot[1]; } else { res+=pot[2]; } } } if(press(res+pot[0]+res+pot[1])==N) { if(press(res+pot[0])==N) { res+=pot[0]; } else { res+=pot[1]; } } else { res+=pot[2]; } */ return "a"; //return res; } /* int main() { cin.tie(0); ios_base::sync_with_stdio(0); string s; cin>>s; if(guess_sequence(s.size())==s) { cout<<"Ok\n"; } else { cout<<"No\n"; } return 0; } */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...