제출 #1146678

#제출 시각아이디문제언어결과실행 시간메모리
1146678kvintsekstakord콤보 (IOI18_combo)C++20
10 / 100
15 ms456 KiB
#include "combo.h"
#include <bits/stdc++.h>

using namespace std;

string chars = "ABXY";

string guess_sequence(int N) {
  
  string S = "";
  for(int i = 0; i < 4; i++){
    int res = press(chars.substr(i, 1));
    if(res) S+=chars[i];
  }
  for(int i = 0; i < N-1; i++){
    for(int j = 0; j < 4; j++){
      if(chars[j]==S[0]) continue;

       int res = press(S+chars[j]);
       if(res==(int)S.size()+1) S+=chars[j];
    }
  }

  return S;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...