Submission #1325893

#TimeUsernameProblemLanguageResultExecution timeMemory
1325893x_aCombo (IOI18_combo)C++20
10 / 100
21 ms448 KiB
#include "combo.h"
#include <bits/stdc++.h>

using namespace std;

string guess_sequence(int N) {
  string p = "", s = "";
  int last = 0;
  vector<char> A = {'A', 'B', 'X', 'Y'};
  for (int i = 0; i < N; ++i) {
    p = s;

    for(int j = 0; j < 4; j ++){
      int x = press(p + A[j]);
      if(x > last){
        s += A[j];
        last = x;
        break;
      }
    }
  }
  return s;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...