Submission #605442

#TimeUsernameProblemLanguageResultExecution timeMemory
605442AmirElarbiCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#define vi vector<int>
#define gi greater<int>
#define gr greater
#define ve vector
#define ll long long
#define vf vector<float>
#define vll vector<pair<ll,ll>>
#define ii pair<int,int>
#define pll pair<ll,ll>
#define vvi vector<vi>
#define vii vector<ii>
#define gii greater<ii>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define INF 1e9
#define eps 1e-7
#define eps1 1e-2
#define optimise ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define MAX_A 2e5+5
using namespace std;
const int MOD = 1e9+7;
const int nax = 1e6+5;
typedef complex<int> Point;
#define X real()
#define Y imag()

#include "combo.h"
char let[4] = {'A','B','X','Y'};
string guess_sequence(int n) {
    string s = "";
    int beg = 0;
    if(press("A")) beg = 0,s = "A";
    else if(press("B")) beg = 1,s= "B";
    else if(press("X")) beg = 2,s = "X";
    else beg = 3,s = "Y";
    for (int i = 2; i <= n; ++i)
    {
        string cur = s+"X"+s+"YX"+s+"YY"+s+"YB";
        int a = pass(cur);
        if(a == i-1) s+="B";
        else if(a == i) s+="X";
        else s += "Y";
    }
    return s;
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:42:17: error: 'pass' was not declared in this scope
   42 |         int a = pass(cur);
      |                 ^~~~