Submission #1144082

#TimeUsernameProblemLanguageResultExecution timeMemory
1144082JohanCombo (IOI18_combo)C++20
30 / 100
10 ms460 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int n){ string s = ""; char chk = 'w'; vector < char > cur{'A', 'B', 'X', 'Y'}; for(int i = 1; i <= n; i++){ int cnt = 0; string sc; for(auto in : cur){ if(in == chk) continue; sc = s; sc += in; cnt++; if(cnt == 3 && chk != 'w') break; if(cnt == 4 && chk == 'w') break; if(press(sc) == s.size() + 1) break; } if(i == 1) chk = sc[0]; s = sc; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...