Submission #433884

#TimeUsernameProblemLanguageResultExecution timeMemory
433884frodakcinSeats (IOI18_seats)C++11
Compilation error
0 ms0 KiB
#include "combo.h"
#include <cstdio>

char btn[]="ABXY";

std::string guess_sequence(int N) {
  std::string p = "";

	int first=0;
	first |= !!press("BY");
	first |= !!press("XY")<<1;
	std::string poss="";
	for(int i=0;i<4;++i)
		if(i!=first)
			poss.push_back(btn[i]);

  std::string S = "";
	S += btn[first];
	for(int i=1;i+1<N;++i)
	{
		p="";
		p += (S+poss[1]);
		p += (S+poss[2]+poss[0]);
		p += (S+poss[2]+poss[1]);
		p += (S+poss[2]+poss[2]);
		S += poss[press(p)-i];
	}
	if(N>1)
	{
		int last=0;
		for(;last<2;++last)
			if(press(S+poss[last])==N)
				break;
		S += poss[last];
	}

  return S;
}

Compilation message (stderr)

seats.cpp:1:10: fatal error: combo.h: No such file or directory
    1 | #include "combo.h"
      |          ^~~~~~~~~
compilation terminated.