Submission #1357217

#TimeUsernameProblemLanguageResultExecution timeMemory
1357217avahw콤보 (IOI18_combo)C++20
0 / 100
0 ms344 KiB
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;

std::string guess_sequence(int N) {
  std::string p = "";
  string ref = "ABX";
  // brute force first char
  while(p.size() < N){
    bool done = false;
    for(int i = 0; i < 3; i++){
      if(press(p + ref[i]) == p.size() + i + 1){
        p += ref[i];
        done = true;
        break;
      }
    }
    if(!done) p += 'Y';
  }
  return p;
}
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...