Submission #1356060

#TimeUsernameProblemLanguageResultExecution timeMemory
1356060hewkawar콤보 (IOI18_combo)C++20
10 / 100
15 ms440 KiB
#include "combo.h"

std::string guess_sequence(int N) {
  
  // int coins = press(p);
  std::string S = "";
  for (int i = 0; i < N; ++i) {
    // S += 'A';
    int a = press(S + "A");
    int b = press(S + "B");
    int x = press(S + "X");
    int y = press(S + "Y");

    // cout << a << b << x << y;
    // break;
    if (a - S.size() == 1) {
      S += "A";
    }
    if (b - S.size() == 1) {
      S += "B";
    }
    if (x - S.size() == 1) {
      S += "X";
    }
    if (y - S.size() == 1) {
      S += "Y";
    }
  }

  // cout << S << endl;

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