Submission #903877

#TimeUsernameProblemLanguageResultExecution timeMemory
903877zhasynCombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#define pb push_back
#define pf push_front
using namespace std;
#define F first
#define S second
typedef long long ll;
#define pii pair <int, int>
#define pll pair <ll, ll>
typedef long double ld;
const ll N = 2 * 1e5 + 10, len = 316;
const ll mod = 1e9 + 7;

ll um(ll a, ll b){
	return ((1LL * a * b) % mod + mod) % mod;
}
ll subr(ll a, ll b){
	return ((1LL * a - b) % mod + mod) % mod;
}
string guess_sequence(int n){
	string ans = "";
	string s = "ABXY";
	for(int i = 0; i < n; i++){
		for(int j = 0; j < 4; j++){
			int res = press(ans + s[j]);
			if(res == i + 1){
				ans += s[j];
				break;
			}
		}
	}
	return ans;
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:25:14: error: 'press' was not declared in this scope; did you mean 'res'?
   25 |    int res = press(ans + s[j]);
      |              ^~~~~
      |              res