Submission #415144

#TimeUsernameProblemLanguageResultExecution timeMemory
415144aris12345678Combo (IOI18_combo)C++14
10 / 100
83 ms552 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; const int mxN = 2005; string guess_sequence(int n) { string p = "", comb; if(press("A") == 1) p = "A", comb = "BXY"; else if(press("B") == 1) p = "B", comb = "AXY"; else if(press("X") == 1) p = "X", comb = "ABY"; else p = "Y", comb = "ABX"; while((int) p.length() < n) { for(int i = 0; i < 3; i++) { if(press(p+comb[i]) == (int) p.length()+1) { p += comb[i]; break; } } } return p; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...