제출 #1206039

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

using namespace std;

string guess_sequence(int n)
{
  string p;
  string x;
  if (press("A"))
    x = "BXY", p = "A";
  else if (press("B"))
    x = "AXY", p = "B";
  else if (press("X"))
    x = "ABY", p = "X";
  else
    x = "ABX", p = "Y";
  for (int i = 2; i <= n; i++)
  {
    p += x[0];
    for (int k = 1; k < 3; k++)
    {
      if (press(p) == i)
        break;
      p.back() = x[k];
    }
  }
  return p;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...