Submission #301637

#TimeUsernameProblemLanguageResultExecution timeMemory
301637DovranCombo (IOI18_combo)C++11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#inculde "combo.h"
#define N 100009
#define pii pair <int, int>
#define ff first
#define sz() size()
#define ss second
#define pb push_back
#define ll long long

using namespace std;

char c[5]={'X', 'Y', 'A', 'B'};

string guess_sequence(int n){
	string s="X";
	int in=-1;
	for(int i=0; i<3; i++){
		s[0]=c[i];
		int x=press(s);
		if(x){
			in=i;
			break;
		}
	}
	if(in<0)
		in=3;
	s[0]=c[in];
	swap(c[in], c[3]);
	for(int i=1; i<n; i++){
		s+='X';
		in=0;
		for(int j=0; j<2; j++){
			s[i]=c[j];
			int x=press(s);
			if(x==i){
				in=1;
				break;
			}
		}
		if(!in)
			s[i]=c[2];
	}
	return s;
}

Compilation message (stderr)

combo.cpp:2:2: error: invalid preprocessing directive #inculde; did you mean #include?
    2 | #inculde "combo.h"
      |  ^~~~~~~
      |  include
combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:20:9: error: 'press' was not declared in this scope
   20 |   int x=press(s);
      |         ^~~~~
combo.cpp:35:10: error: 'press' was not declared in this scope
   35 |    int x=press(s);
      |          ^~~~~