Submission #1225559

#TimeUsernameProblemLanguageResultExecution timeMemory
1225559edga1Combo (IOI18_combo)C++20
10 / 100
15 ms492 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace::std; string guess_sequence(int N) { char l[]={'A','B','X','Y'}; string p = "A"; int atb=press(p); if(atb==0){ p="B"; atb=press(p); } if(atb==0){ p="X"; atb=press(p); } if(atb==0) p="Y"; for(int i=2; i<=N; i++){ for(int j=0; j<4; j++){ if(l[j]==p[0]) continue; p=p.substr(0,i-1)+l[j]; atb=press(p); if(atb==i) break; } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...