# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
456164 | BT21tata | Crayfish scrivener (IOI12_scrivener) | C++17 | 0 ms | 0 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;
string s[1000005];
int pos=0;
void Init() {}
void TypeLetter(char L)
{
s[pos+1]=s[pos]+L;
pos++;
}
void UndoCommands(int U)
{
s[pos+1]=s[pos-U]
pos++;
}
char GetLetter(int P)
{
return s[pos][P];
}
/*
14
T a
T b
P 1
T d
U 2
U 1
P 2
T e
U 1
U 5
T c
P 2
U 2
P 2
*/