Submission #20807

#TimeUsernameProblemLanguageResultExecution timeMemory
20807jjwdi0Crayfish scrivener (IOI12_scrivener)C++11
Compilation error
0 ms0 KiB
int par[1<<20][21], size[1<<20], kth, Q; char a[1<<20]; void TypeLetter(char x) { if(kth) par[kth][0] = kth - 1; for(int i = 1; par[kth][i-1]; i++) { par[kth][i] = par[par[kth][i-1]][i-1]; } a[kth] = x, size[kth] = size[par[kth][0]] + 1, kth++; } void UndoCommand(int x) { par[kth][0] = kth - x - 1; for(int i = 1; par[kth][i-1]; i++) { par[kth][i] = par[par[kth][i-1]][i-1]; } a[kth] = a[par[kth][0]], size[kth] = size[par[kth][0]], kth++; } char GetLetter(int x) { int u = kth - 1; for(int i = 19; i + 1; i--) { if(size[par[u][i]] > x) u = par[u][i]; } return a[u]; }

Compilation message (stderr)

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