Submission #1142236

#TimeUsernameProblemLanguageResultExecution timeMemory
1142236jokerCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include<combo.h>
#include <unordered_set>
#include <unordered_map>
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <iomanip>
#include <numeric>

using namespace std;
std::string guess_sequence(int N) {
  string S = "";
  vector<char> btns = {'X','Y','B'};
  int frstidx = -1;
  while (S.length() != N) {
    if (S.length() == 0) {
        for (size_t i = 0; i < 3; i++) {
            string st;
            st += btns[i];
            int coin = press(st);
            if (coin == 1) {
                frstidx = i;
                S += btns[i];
                break;
            } else if (i == 2) {
                S += 'A';
            }
            
        }
    } else {
        for (size_t i = 0; i < 3; i++) {
            bool ps = false;
            if (i != frstidx) {
                string st = S+btns[i];
                int coin = press(st);
                if (coin == S.length()+1) {
                    ps = true;
                    S += btns[i];
                    break;
                }
            }
            if (!ps) {
              S += 'A';
            }
        }
    }
  }
  return S;
}

Compilation message (stderr)

combo.cpp:1:9: fatal error: combo.h: No such file or directory
    1 | #include<combo.h>
      |         ^~~~~~~~~
compilation terminated.