제출 #1356073

#제출 시각아이디문제언어결과실행 시간메모리
1356073tesseractexw콤보 (IOI18_combo)C++20
10 / 100
10 ms444 KiB
#include "combo.h"
#include <vector>

const std::vector<char> cands = { 'X', 'Y', 'A', 'B' };
std::string guess_sequence(int N) {
  std::string p = "";
  for (int i = 1; i <= N; ++i) {
    for (char ch : cands) {
      if (!p.empty() && p[0] == ch) {
        continue;
      }
      p.push_back(ch);
      if (press(p) == i) {
        break;
      } else {
        p.pop_back();
      }
    }
  }
  return p;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...