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 = 1e6+5;
char s[N];
int len[N];
int opr;
int n;
void Init() {}
void TypeLetter(char L) {
s[n++] = L;
len[++opr] = n;
}
void UndoCommands(int U) {
n = len[max(0,opr-U-1)];
len[++opr] = n;
}
char GetLetter(int P) {
return P>=n ? '\0' : s[P];
}
# | 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... |