Submission #1148969

#TimeUsernameProblemLanguageResultExecution timeMemory
1148969ali2241Combo (IOI18_combo)C++20
Compilation error
0 ms0 KiB

#include <bits/stdc++.h>
// #define int long long
#define arr2 array<int, 2>
#define arr3 array<int, 3>
#define all(a) a.begin(), a.end()
#define double long double
// #pragma GCC target("avx2")

using namespace std;

const int N = 401, M = 1e9 + 7;

string s;

string guess_sequence(int n) {
    return s;
}

char chs[4] = {'A', 'B', 'X', 'Y'};

void fun() {
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i) {
        for (int j = 0; j < 4; ++j) {
            if (press(s + chs[j])) {
                s += chs[j];
                break;
            }
        }
    }
}

int32_t main() {
    // ios::sync_with_stdio(0);
    // cin.tie(0); cout.tie(0);
    // int tc;
    // cin >> tc;
    // while (tc--)
    fun();
}

Compilation message (stderr)

combo.cpp: In function 'void fun()':
combo.cpp:27:17: error: 'press' was not declared in this scope
   27 |             if (press(s + chs[j])) {
      |                 ^~~~~