Submission #585686

#TimeUsernameProblemLanguageResultExecution timeMemory
585686alireza_kavianiCombo (IOI18_combo)C++17
0 / 100
1 ms208 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string s , t = "ABXY"; string guess_sequence(int N) { int ind = (press("XY") << 1) + (press("BY")); s += t[ind]; t = t.substr(0 , ind) + t.substr(ind + 1 , 10); for(int i = 1 ; i + 1 < N ; i++){ string query = s + t[0] + t[0] + s + t[0] + t[1] + s + t[0] + t[2] + s + t[1]; int ind = i + 2 - press(query); s += t[ind]; } int last = 0; for(int i = 1 ; i < 3 ; i++){ if(press(s + t[i]) == N){ last = i; } } s += t[last]; return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...