제출 #203883

#제출 시각아이디문제언어결과실행 시간메모리
203883V003콤보 (IOI18_combo)C++14
0 / 100
2 ms200 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int n) { char a, b, c, d; string s=""; int k=press("AB"); if(k) { k=press("A"); if(k){ a='A'; b='B'; c='X'; d='Y'; } else { a='B'; b='A'; c='X'; d='Y'; } } else { k=press("Y"); if(k) { a='Y'; b='B'; c='X'; d='A'; } else { a='X'; b='B'; c='A'; d='Y'; } } s=s+a; int l=1; while(l<n) { k=press(s+b+s+c+c+s+c+b+s+c+d); if(k==l) s=s+d; if(k==l+1) s=s+b; if(k==l+2) s=s+c; l++; } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...