제출 #216485

#제출 시각아이디문제언어결과실행 시간메모리
216485T0p_콤보 (IOI18_combo)C++14
0 / 100
1 ms200 KiB
#include<bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int n) { string s = ""; int ab = press("AB"); if(ab == 0) { if(press("X")) s += 'X'; else s += 'Y'; } else { if(press("A")) s += 'A'; else s += 'B'; } for(int i=2 ; i<=n ; i++) { string test = ""; test += s; test += "XX"; test += s; test += "XY"; test += s; test += "XZ"; test += s; test += "Y"; test += s[0]; int ret = press(test); if(ret == 0) s += 'Z'; else if(ret == 1) s += 'Y'; else s += 'X'; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...