Submission #1055008

#TimeUsernameProblemLanguageResultExecution timeMemory
1055008enderCombo (IOI18_combo)C++17
10 / 100
36 ms856 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { vector<char> c = {'A', 'B', 'X', 'Y'}; string p = ""; int coins = 0; for(int i = 0; i < 4; ++i){ if(press(p+c[i]) > coins){ p += c[i]; c.erase(c.begin() + i); coins = 1; break; } } while(coins != N){ for(auto &i : c){ if(press(p+i) > coins){ p += i; coins++; break; } } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...