제출 #629833

#제출 시각아이디문제언어결과실행 시간메모리
629833airths콤보 (IOI18_combo)C++17
10 / 100
95 ms588 KiB
#include "combo.h"

std::string guess_sequence(int N) {
  std::string p = "";
  int cur=0;
  char an[]={'A', 'B', 'X', 'Y'};
  for (int i = 0; i < N; ++i) {
    std::string jk[]={p+'A', p+'B', p+'X', p+'Y'};
    for (int j=0; j<4; j++){
      int c=press(jk[j]);
      if (c==cur+1){
        cur++;
        p+=an[j];
      }
    }
  }
  return p;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...