제출 #805315

#제출 시각아이디문제언어결과실행 시간메모리
805315Malix콤보 (IOI18_combo)C++14
0 / 100
1 ms208 KiB
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;

std::string guess_sequence(int N) {
  vector<char> b = {'A', 'B', 'X', 'Y'};
  int i=0;int r=0;
  std::string p = "";std::string S = "";
  while(!r){
    p.push_back(b[i]);
    r=press(p);
    p.clear();
    i++;
  }
  S.push_back(b[i-1]);
  b.erase(b.begin()+i-1);
  
  for(int i=0;i<N-1;i++){
    r=0;int t=0;
    while(!r){
      p=S;
      p.push_back(b[i]);
      r=press(p);
      t++;
    }
    S.push_back(b[t-1]);
  }

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