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;
//#include "grader.cpp"
vector <int> command;
void Init(){
}
void TypeLetter(char L){
command.push_back(L);
}
void UndoCommands(int U){
command.push_back(-U-1);
}
char GetLetter(int P){
string ans = "";
for(int i=command.size()-1; ~i; ){
if(command[i] < 0)
i = i+command[i];
else{
ans += (char)command[i];
i--;
}
}
return ans[ans.size()-P-1];
}
# | 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... |