제출 #230805

#제출 시각아이디문제언어결과실행 시간메모리
230805arbor크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define lc (i << 1)
#define rc (i << 1 | 1)
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const int MN = 1e6 + 5, LN = 17, MOD = 1e9 + 7, INF = 0x3f3f3f3f, BSZ = 320;
char s[MN];
int spt[MN][20], dep[MN];
int cur;

void Init();

void TypeLetter(char L) {
    cur++;
    s[cur] = L;
    spt[cur][0] = cur - 1;
    dep[cur] = dep[cur - 1] + 1;
    for (int j = 1; j < LN; j++)
        spt[cur][j] = spt[spt[cur][j - 1]][j - 1];
}

void UndoCommands(int U) {
    int last = cur - U;
    cur++;
    s[cur] = s[last];
    int par = spt[last][0];
    spt[cur][0] = par;
    dep[cur] = dep[par] + 1;
    for (int j = 1; j < LN; j++)
        spt[cur][j] = spt[spt[cur][j - 1]][j - 1];
}

char GetLetter(int P) {
    int now = cur;
    for (int j = LN - 1; j >= 0; j--)
        if (dep[spt[now][j]] >= P)
            now = spt[now][j];
    return s[now];
}

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

/tmp/ccx3eVKZ.o: In function `main':
grader.cpp:(.text.startup+0x5d): undefined reference to `Init()'
collect2: error: ld returned 1 exit status