Submission #1072426

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10724262024-08-23 18:52:12andrewpCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
//Dedicated to my love, ivaziva
//#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
using pii = pair<int, int>;
using ll = int64_t;
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define dbg(x) cerr << #x << ": " << x << '\n';
string guess_sequence(int n) {
char f;
if (press("AB")) {
if (press("A"))
f = 'A';
else
f = 'B';
} else {
if (press("Y") == 1)
f = 'Y';
else
f = 'X';
}
string ans = "";
ans.push_back(f);
int sz = 1;
for (int i = 2; i < n; i++) {
if (f == 'A') {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:15:9: error: 'press' was not declared in this scope
   15 |     if (press("AB")) {
      |         ^~~~~
combo.cpp:31:23: error: 'press' was not declared in this scope
   31 |             int ret = press(ans + "Y" + ans + "XX" + ans + "XY" + ans + "XB");
      |                       ^~~~~
combo.cpp:39:23: error: 'press' was not declared in this scope
   39 |             int ret = press(ans + "Y" + ans + "XX" + ans + "XY" + ans + "XA");
      |                       ^~~~~
combo.cpp:47:23: error: 'press' was not declared in this scope
   47 |             int ret = press(ans + "Y" + ans + "AA" + ans + "AY" + ans + "AB");
      |                       ^~~~~
combo.cpp:56:23: error: 'press' was not declared in this scope
   56 |             int ret = press(ans + "X" + ans + "AX" + ans + "AA" + ans + "AB");
      |                       ^~~~~
combo.cpp:70:13: error: 'press' was not declared in this scope
   70 |         if (press(ans + 'X') == n)
      |             ^~~~~
combo.cpp:77:13: error: 'press' was not declared in this scope
   77 |         if (press(ans + 'X') == n)
      |             ^~~~~
combo.cpp:84:13: error: 'press' was not declared in this scope
   84 |         if (press(ans + 'Y') == n)
      |             ^~~~~
combo.cpp:91:13: error: 'press' was not declared in this scope
   91 |         if (press(ans + 'A') == n)
      |             ^~~~~