# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
935880 | PagodePaiva | Crayfish scrivener (IOI12_scrivener) | C++17 | 1036 ms | 15792 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>
#pragma GCC optimize("03")
#define N 1000005
using namespace std;
int pai[N], h[N], jump[N], pos[N];
char letter[N];
int t;
void Init() {
t = 0;
}
void TypeLetter(char L) {
t++;
pai[t] = t-1;
h[t] = h[t-1] + 1;
letter[t] = L;
pos[t] = pos[t-1]+1;
int p = t-1;
if(h[jump[p]] - h[p] == h[jump[jump[p]]] - h[jump[p]]){
jump[t] = jump[jump[p]];
}
else{
jump[t] = p;
}
}
void UndoCommands(int U) {
Compilation message (stderr)
# | 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... |