# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
252538 | Kubin | 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;
vector<string> history;
void Init()
{
history.push_back("");
}
void TypeLetter(char ch)
{
history.push_back(history.back() + ch);
}
void UndoCommands(size_t k)
{
history.push_back(history.rbegin()[k - 1]);
}
char GetLetter(size_t i)
{
return history.back()[i];
}