제출 #415921

#제출 시각아이디문제언어결과실행 시간메모리
415921arayi크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++14
컴파일 에러
0 ms0 KiB
#include "grader.h"
#include <vector>
#include <algorithm>
#include <set>
#define ad push_back
using namespace std;
const int N = 1e6 + 10;

int a[N], i1 = 1;
int p[N][20];
char c[N];
vector<int> fp;
void Init()
{
	fp.ad(0);
}

void TypeLetter(char L)
{
	a[i1] = a[i1 - 1] + 1;
	c[i1] = L;
	i1++;
}

void UndoCommands(int U)
{
	a[i1] = a[i1 - U - 1];
	fp.ad(i1);
	auto i = lower_bound(fp.begin(), fp.end(), i1 - U);
	p[i1][0] = *(--i);
	//printf("%d %d\n", i1, p[i1][0]);
	for (int i = 1; i < 20; i++) p[i1][i] = p[p[i1][i - 1]][i - 1];
	i1++;
}

char GetLetter(int P)
{
	P++;
	auto s = fp.back();
	//printf("%d\n", s);
	for (int i = 20 - 1; i >= 0; i--)
		if (a[p[s][i]] >= P)s = p[s][i];
	if (a[s] >= P) s = p[s][0];
	s += P - a[s];
	return c[s];
}

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

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