Submission #73789

#TimeUsernameProblemLanguageResultExecution timeMemory
73789TuGSGeReL크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #define ll long long #define mp make_pair #define pub push_back #define pob pop_back #define ss second #define ff first #define ext exit(0) using namespace std; char s[1000001]; ll par[1000001][20],l[1000001],i=1,now=0,j; void Init() {} inline ll find(int i,int k){ for(j=0;j<20;j++) if((1<<j)&k) i=par[i][j]; return i; } inline void TypeLetter(char L) { s[i]=L; par[i][0]=now; l[i]=l[now]+1; for(j=1;j<20;j++){ if((1<<j)>=l[i])break; par[i][j]=par[par[i][j-1]][j-1]; } now=i; i++; } inline void UndoCommands(int U) { now=i-U-1; s[i]=s[now]; for(j=0;j<20;j++)par[i][j]=par[now][j]; l[i]=l[now]; i++; } inline char GetLetter(int P) { int x=find(i-1,l[i-1]-P-1); return s[x]; }

Compilation message (stderr)

/tmp/ccDHNxc0.o: In function `main':
grader.cpp:(.text.startup+0xef): undefined reference to `TypeLetter(char)'
grader.cpp:(.text.startup+0x14b): undefined reference to `UndoCommands(int)'
grader.cpp:(.text.startup+0x177): undefined reference to `GetLetter(int)'
collect2: error: ld returned 1 exit status