# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
547120 | oToToT | 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 <ext/rope>
__gnu_cxx::crope a[1000001];
int cnt;
void Init() { cnt = 0; }
void TypeLetter(char c) { a[++cnt] = a[cnt] + c; }
void UndoCommands(int k) { arr[++cnt]=arr[cnt-k-1]; }
char GetLetter(int k){ return arr[cnt][k]; }