# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
60698 | aome | Crayfish scrivener (IOI12_scrivener) | C++17 | 784 ms | 144416 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
int cur;
int cnt1, cnt2;
int h[N];
int par[20][N];
int arr[N];
char a[N];
void Init() {}
void TypeLetter(char L) {
++cnt1;
par[0][cnt1] = cur, h[cnt1] = h[cur] + 1;
cur = cnt1, a[cur] = L;
for (int i = 1; i < 20; ++i) {
par[i][cur] = par[i - 1][par[i - 1][cur]];
}
arr[++cnt2] = cur;
}
void UndoCommands(int U) {
cur = arr[cnt2 + 1] = arr[cnt2 - U];
++cnt2;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |