제출 #170093

#제출 시각아이디문제언어결과실행 시간메모리
170093buttercrab콤보 (IOI18_combo)C++17
100 / 100
41 ms532 KiB
#include "combo.h" using namespace std; string guess_sequence(int n) { string s, t; if (press("AB")) { if (press("A")) t = "BXY", s = "A"; else t = "AXY", s = "B"; } else { if (press("X")) t = "ABY", s = "X"; else t = "ABX", s = "Y"; } for (int i = 1; i < n - 1; i++) { s += t[press(s + t[1] + s + t[2] + t[0] + s + t[2] + t[1] + s + t[2] + t[2]) - s.size()]; } if(n == 1) return s; if(press(s + t[0]) == n) return s + t[0]; if(press(s + t[1]) == n) return s + t[1]; return s + t[2]; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...