제출 #433884

#제출 시각아이디문제언어결과실행 시간메모리
433884frodakcin자리 배치 (IOI18_seats)C++11
컴파일 에러
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;
}

컴파일 시 표준 에러 (stderr) 메시지

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