Submission #1206039

#TimeUsernameProblemLanguageResultExecution timeMemory
1206039isamatdinCombo (IOI18_combo)C++20
30 / 100
10 ms456 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { string p; string x; if (press("A")) x = "BXY", p = "A"; else if (press("B")) x = "AXY", p = "B"; else if (press("X")) x = "ABY", p = "X"; else x = "ABX", p = "Y"; for (int i = 2; i <= n; i++) { p += x[0]; for (int k = 1; k < 3; k++) { if (press(p) == i) break; p.back() = x[k]; } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...