제출 #1148967

#제출 시각아이디문제언어결과실행 시간메모리
1148967ali2241콤보 (IOI18_combo)C++20
컴파일 에러
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();
}

컴파일 시 표준 에러 (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])) {
      |                 ^~~~~