Submission #317324

# Submission time Handle Problem Language Result Execution time Memory
317324 2020-10-29T13:38:36 Z soroush Combo (IOI18_combo) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

using namespace std;

string guess_sequence(int n){
	string ans = "";
	for(int i = 1 ; i <= n ; i ++){
		string cur = "A";
		if(press(ans + "B") == i)	
			cur = "B";
		else if(press(ans + "X") == i)	
			cur = "X";
		else if(press(ans + "Y") == i)	
			cur = "Y";
		ans += cur;
	}
	return(ans);
}

Compilation message

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:9:6: error: 'press' was not declared in this scope
    9 |   if(press(ans + "B") == i)
      |      ^~~~~