Submission #295224

#TimeUsernameProblemLanguageResultExecution timeMemory
295224re404dCombo (IOI18_combo)C++11
10 / 100
58 ms568 KiB
#include "combo.h" using namespace std; string guess_sequence(int N) { string s = "", temp; string l; int i, v, j; v = press("A"); if (v) { s = "A"; l = "BXY"; } else { v = press("B"); if (v) { s = "B"; l = "AXY"; } else { v = press("X"); if (v) { s = "X"; l = "ABY"; } else { s = "Y"; l = "ABX"; } } } for (i = 2; i<=N; i++) { for (j = 0; j<3; j++) { temp = s + l[j]; v = press(temp); if (v == i) { s = s + l[j]; break; } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...