Submission #1128586

#TimeUsernameProblemLanguageResultExecution timeMemory
1128586ElayV13Combo (IOI18_combo)C++20
5 / 100
0 ms408 KiB
#include "combo.h" #include "bits/stdc++.h" using namespace std; string guess_sequence(int n){ char f = 'x'; vector < char > c = {'A' , 'B' , 'X' , 'Y'}; for(int i = 0;i < 4;i++){ int cnt = 0; for(int j = 0;j < 4;j++){ string q = ""; q += c[j]; q += c[i]; if(press(q) == 1) cnt++; } if(cnt == 4) f = c[i]; } string ans = ""; ans += f; for(int i = 1;i < n;i++){ for(int j = 0;j < 4;j++){ string cc = ans; cc += c[j]; if(press(cc) == cc.size()){ ans = cc; break; } } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...