제출 #1213556

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

using namespace std;

string guess_sequence(int N) {
  string x = "";
  char c[] = {'A', 'B', 'X', 'Y'};
  int i = 0;
  while(x.size() != N){
    int k = press(x + c[i]);
    if(k == x.size() + 1){
      x += c[i];
      i = 0;
    }else{
      i++;
      if(x.size() && c[i] == x[0]){
        i++;
      }
    }
  }
  return x;
}

/*
g++ grader.cpp combo.cpp -o run.exe
.\run.exe
*/

//atilla
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...