Submission #419426

#TimeUsernameProblemLanguageResultExecution timeMemory
419426Bill_00Crayfish scrivener (IOI12_scrivener)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; char last; int a[1000005][25],cnt,lol[1000005],sz[1000005]; char x[1000005]; int find(int num){ return lol[num]=(lol[num]==num?num:find(lol[num])); } void TypeLetter(char L) { cnt++; x[cnt]=L; sz[cnt]=sz[find(cnt-1)]+1; lol[cnt]=cnt; a[cnt][0]=find(cnt-1); for(int i=1;i<=20;i++){ a[cnt][i]=a[a[cnt][i-1]][i-1]; } } void UndoCommands(int U) { cnt++; lol[cnt]=find(cnt-U-1); sz[cnt]=sz[find(cnt-U-1)]; } char GetLetter(int P) { int siz=sz[find(cnt)]; int k=siz-P-1; int y=find(cnt); for(int i=20;i>=0;i--){ if(k>=(1<<i)){ y=a[y][i]; k-=(1<<i); } } return x[y]; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccCp4iYn.o: in function `main':
grader.cpp:(.text.startup+0x63): undefined reference to `Init()'
collect2: error: ld returned 1 exit status