Submission #1218401

#TimeUsernameProblemLanguageResultExecution timeMemory
1218401tapilyocaCombo (IOI18_combo)C++20
0 / 100
0 ms408 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; using ll = long long; using str = string; template<typename T> using vec = vector<T>; #define pb push_back std::string guess_sequence(int N) { str S = ""; ll len = 1; ll check = press("A"); if(check == 1) { while(S.length() != N) { ll lol = press(S + "B" + S + "XB" + S + "XX" + S + "XY"); if(lol == len+1) S.pb('B'); else if(lol == len + 2) S.pb('X'); else S.pb('Y'); } } check = press("B"); if(check == 1) { while(S.length() != N) { ll lol = press(S + "A" + S + "XA" + S + "XX" + S + "XY"); if(lol == len+1) S.pb('A'); else if(lol == len + 2) S.pb('X'); else S.pb('Y'); } } check = press("X"); if(check) { while(S.length() != N) { ll lol = press(S + "A" + S + "BA" + S + "BX" + S + "BY"); if(lol == len+1) S.pb('A'); else if(lol == len + 2) S.pb('B'); else S.pb('Y'); } } while(S.length() != N) { ll lol = press(S + "A" + S + "BA" + S + "BX" + S + "BB"); if(lol == len+1) S.pb('A'); else if(lol == len + 2) S.pb('B'); else S.pb('X'); } return S; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...