제출 #205122

#제출 시각아이디문제언어결과실행 시간메모리
205122SoGood콤보 (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...