Submission #737779

#TimeUsernameProblemLanguageResultExecution timeMemory
737779Elvin_FritlCombo (IOI18_combo)C++17
0 / 100
0 ms208 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 i:v){ if(press(s+i)==i+1){ s+=i; break; } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...