Submission #737780

#TimeUsernameProblemLanguageResultExecution timeMemory
737780Elvin_FritlCombo (IOI18_combo)C++17
10 / 100
53 ms560 KiB
#include <bits/stdc++.h> using namespace std; #include "combo.h" string guess_sequence(int n) { string s; vector<char>v; if(press("A")==1){ s+='A'; v.push_back('B'); v.push_back('Y'); v.push_back('X'); } else if(press("B")==1){ s+='B'; v.push_back('A'); v.push_back('Y'); v.push_back('X'); } else if(press("X")==1){ s+='X'; v.push_back('B'); v.push_back('Y'); v.push_back('A'); } else{ s+='Y'; v.push_back('B'); v.push_back('A'); v.push_back('X'); } for(int i=1;i<n;i++){ for(char j:v){ if(press(s+j)==i+1){ s+=j; break; } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...