Submission #151265

#TimeUsernameProblemLanguageResultExecution timeMemory
151265dennisstarCombo (IOI18_combo)C++11
10 / 100
84 ms412 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; char ar[]="ABXY"; string guess_sequence(int N) { std::string p = ""; int i, j; p+=' '; for (i=0; i<4; i++) { p[0]=ar[i]; if (press(p)) break; } for (i=1; i<N; i++) { p+=' '; for (j=0; j<4; j++) { if (ar[j]==p[0]) continue; p[i]=ar[j]; if (press(p)==i+1) break; } if (j>=4) assert(false); } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...