Submission #919505

#TimeUsernameProblemLanguageResultExecution timeMemory
919505NurislamCombo (IOI18_combo)C++17
10 / 100
26 ms1220 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int N) { string p = ""; vector<char> v = {'A', 'B', 'X', 'Y'}; for(int i = 0; i < N; i++){ if(i == 0){ for(auto j:v){ int coin = press(p+j); if(coin == i+1){ p+=j; break; } } }else{ for(auto j:v){ if(j == p[0])continue; int coin = press(p+j); if(coin == i+1){ p+=j; break; } } } } string S = p; return S; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...