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 <string>
using namespace std;
int const N=1e6+10;
struct node
{
string s="";
};
node* com[N]={};
int num=0;
void Init()
{
for (int i=0;i<N;i++)
com[i]=new node();
}
void TypeLetter(char L)
{
num++;
com[num]->s=com[num-1]->s+L;
}
void UndoCommands(int U)
{
com[num+1]->s=com[num-U]->s;
num++;
}
char GetLetter(int P)
{
return com[num]->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... |