Submission #295227

#TimeUsernameProblemLanguageResultExecution timeMemory
295227re404dCombo (IOI18_combo)C++11
30 / 100
44 ms556 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<2; j++) { temp = s + l[j]; v = press(temp); if (v == i) { s = s + l[j]; break; } } if (j == 2) s = s + l[j]; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...