Submission #233701

#TimeUsernameProblemLanguageResultExecution timeMemory
233701Toirov_SadiCombo (IOI18_combo)C++17
10 / 100
72 ms548 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int N){ char first = 'A'; string res = ""; if(press("B")) first = 'B'; if(press("X")) first = 'X'; if(press("Y")) first = 'Y'; res += first; for(int i = 2; i <= N; i ++){ for(auto x: {'A', 'B', 'X', 'Y'}){ if(x == first) continue; if(press(res + x) == i){ res += x; break; } } } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...