Submission #744848

#TimeUsernameProblemLanguageResultExecution timeMemory
744848teo_thrashCombo (IOI18_combo)C++14
0 / 100
1 ms292 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { string p; string S; vector<char> let; if(press("A")){ S+="A"; let.push_back('B'); let.push_back('X'); let.push_back('Y'); }else{ if(press("B")){ S+="B"; let.push_back('A'); let.push_back('X'); let.push_back('Y'); }else{ if(press("X")){ S+="X"; let.push_back('A'); let.push_back('B'); let.push_back('Y'); }else{ let.push_back('A'); let.push_back('B'); let.push_back('X'); } } } for(int i=2; i<=n; i++){ bool guessed=false; for(int j=0; j<2; j++){ char c=let[j]; if(press(S+c)==i){ S+=c; guessed=true; break; } } if(!guessed){ S+=let[2]; } } return S; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...