Submission #647933

#TimeUsernameProblemLanguageResultExecution timeMemory
647933JANCARAPANCombo (IOI18_combo)C++17
10 / 100
69 ms600 KiB
#include "combo.h" using namespace std; string ch = "ABXY"; string guess_sequence(int n) { string s = ""; int block = -1; if (press("A") == 1) block = 0; else if (press("B") == 1) block = 1; else if (press("X") == 1) block = 2; else block = 3; s += ch[block]; for (int i=1; i<n; i++) { for (int j=0; j<4; j++) { if (block == j) continue; if (press(s+ch[j]) > i) { s += ch[j]; break; } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...