Submission #1132244

#TimeUsernameProblemLanguageResultExecution timeMemory
1132244AMel0n콤보 (IOI18_combo)C++20
5 / 100
1 ms408 KiB
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;

std::string guess_sequence(int N) {
  std::string f = "";
  if (press("AB") >= 1) {
    if(press("B")) f = "B";
    else f = "A";
  } else {
    if (press("X")) f = "X";
    else f = "Y";
  }
  for(int i = 0; i < 4; i++) {
    std::string one;
    if (i == 0) one = "A";
    else if (i == 1) one = "B";
    else if (i == 2) one = "X";
    else one = "Y";
    std:string two;
    for(int j = 0; j < 4; j++) {
      if (j == 0) two = "A";
      else if (j == 1) two = "B";
      else if (j == 2) two = "X";
      else two = "Y";
      if (press(f + one + two) == 3) return f+one+two;
    }
  }
  return" f+one+two";
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...