제출 #120479

#제출 시각아이디문제언어결과실행 시간메모리
120479KieranHorgan크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; char charOfStep[1000005]; int depth[1000005]; int kthAncestor[1000005][21]; int curStep = 0; void TypeLetter(char L) { curStep++; charOfStep[curStep] = L; depth[curStep] = depth[curStep-1]+1; kthAncestor[curStep][0] = curStep-1; for(int i = 1; 1<<i <= depth[curStep]; i++) kthAncestor[curStep][i] = kthAncestor[kthAncestor[curStep][i-1]][i-1]; } void UndoCommands(int U) { curStep++; charOfStep[curStep] = charOfStep[curStep-1-U]; depth[curStep] = depth[curStep-1-U]; copy(kthAncestor[curStep-1-U], kthAncestor[curStep-1-U]+21, kthAncestor[curStep]); } char GetLetter(int P) { int node = curStep; for(int i = 21; i >= 0; i--) if(depth[node] - (1<<i) >= P+1) node = kthAncestor[node][i]; return charOfStep[node]; }

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

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