Submission #1160891

#TimeUsernameProblemLanguageResultExecution timeMemory
1160891AzaCombo (IOI18_combo)C++20
10 / 100
9 ms456 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int N){ string s; string g = "ABXY"; char ign = 'A'; for(int i = 0; i < 4; i++){ string h; h += g[i]; if(press(h) == 1){ s += h; ign = g[i]; break; } } string gg; for(char ch:g){ if(ch == ign)continue; gg += ch; } g = gg; while(s.size() != N){ bool did = false; for(int i = 0; i < 2; i++){ s += g[i]; if(press(s) == size(s)){ did = true; break; } s.pop_back(); } if(!did){ s += g[2]; } } return s; } /* */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...