Submission #1358428

#TimeUsernameProblemLanguageResultExecution timeMemory
1358428namepotCombo (IOI18_combo)C++20
10 / 100
11 ms456 KiB
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
string guess_sequence(int N) {
  vector<char> Button = {'A','B','X','Y'};
  int index = 0;
  string Combo = "";

  for (int i = 0;i < 4;i++){
    Combo =  Button[i];
    if (press(Combo) == 1){
      Button.erase(Button.begin() + index);
      break;
    }
    index++;
  }

  for (int i =1;i < N;i++){
    for (int j = 0;j < 3;j++){
      //cout << Combo + Button[j] << "\n";
      if (press(Combo + Button[j]) == 1 + i){
        Combo += Button[j];
        break;
      };
    }
  }

  return Combo;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...