# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
935599 | tnun | Crayfish scrivener (IOI12_scrivener) | C++14 | 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;
#define ll long long
string a[1000002];
int cur=0;
void Init(){
}
void TypeLetter(char c){
cur++;
a[cur]=a[cur-1]+c;
}
void UndoCommands(int k){
cur++;
int t=cur-k-1;
t=max(0,t);
a[cur]=a[t];
}
char GetLetter(int s){
return a[cur][c];
}