Submission #90994

#TimeUsernameProblemLanguageResultExecution timeMemory
90994too_stupidCombo (IOI18_combo)C++14
0 / 100
1 ms272 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { string p = ""; string k = "XYZ"; if(press("A")) { p+="A"; for(int i = 1 ; i < n ; i++) { for(int j = 0 ; j < 3 ; ++j) { if(press(p + k[j]) == (int)p.size() + 1) { p+=k[j]; break; } } } } else if(press("B")) { p+="B"; for(int i = 1 ; i < n ; i++) { for(int j = 0 ; j < 3 ; ++j) { if(press(p + k[j]) == (int)p.size() + 1) { p+=k[j]; break; } } } } else if(press("X")) { p+="X"; for(int i = 1 ; i < n ; i++) { for(int j = 0 ; j < 3 ; ++j) { if(press(p + k[j]) == (int)p.size() + 1) { p+=k[j]; break; } } } } else { p+="Y"; for(int i = 1 ; i < n ; i++) { for(int j = 0 ; j < 3 ; ++j) { if(press(p + k[j]) == (int)p.size() + 1) { p+=k[j]; break; } } } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...