Submission #205122

#TimeUsernameProblemLanguageResultExecution timeMemory
205122SoGoodCombo (IOI18_combo)C++17
10 / 100
125 ms544 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int N) { vector<char> v = {'A', 'B', 'X', 'Y'}; string ans=""; for (char d : v) { string ask=""; ask+=d; if (press(ask) == 1) { ans+=ask; break; } } int need=2; for (int i = 1; i < N; ++i) { for (char d : v) { ans+=d; if (press(ans)==need) { ++need; break; } ans.pop_back(); } } // cout<<"CH "<<ans<<'\n'; return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...