Submission #1036268

#TimeUsernameProblemLanguageResultExecution timeMemory
1036268stdfloatCrayfish scrivener (IOI12_scrivener)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "grader.cpp" using namespace std; const int N = (int)1e6 + 1; int q, cnt, cur; vector<char> ch(N); vector<int> num(N), d(N); vector<vector<int>> sp(N, vector<int>(20)); void Init() {} void TypeLetter(char L) { num[++q] = ++cnt; ch[cnt] = L; d[cnt] = d[cur] + 1; sp[cnt][0] = cur; for (int i = 1; i < 20; i++) sp[cnt][i] = sp[sp[cnt][i - 1]][i - 1]; cur = cnt; } void UndoCommands(int U) { q++; num[q] = cur = num[q - U - 1]; } char GetLetter(int P) { int x = cur; for (int i = 19; i >= 0; i--) { if (P < d[x] - (1 << i)) x = sp[x][i]; } return ch[x]; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccNc2U78.o: in function `main':
scrivener.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc5TcKGa.o:grader.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status