# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1000397 | blue | Crayfish scrivener (IOI12_scrivener) | C++17 | 425 ms | 82884 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 <vector>
#include <iostream>
using namespace std;
int curr;
int len[1000001];
char last[1000001];
int letter_anc[1000001][20];
void Init()
{
curr = 0;
len[0] = -1;
last[0] = '?';
for(int e = 0; e < 20; e++)
letter_anc[0][e] = 0;
}
void TypeLetter(char L)
{
curr++;
len[curr] = len[curr-1] + 1;
last[curr] = L;
letter_anc[curr][0] = curr-1;
for(int e = 1; e < 20; e++)
{
letter_anc[curr][e] = letter_anc[ letter_anc[curr][e-1] ][e-1];
}
# | 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... |