제출 #233511

#제출 시각아이디문제언어결과실행 시간메모리
233511Dremix10크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++17
34 / 100
148 ms262148 KiB
#include <bits/stdc++.h>
using namespace std;
char last;
string ans="";
vector<string> state(1000001);
int curr=0;
void Init() {


}

void TypeLetter(char L) {
    last = L;
    ans+=last;
    state[curr++]=ans;

}

void UndoCommands(int U) {

    //int i;
    int k=curr;
    ans=state[k-U-1];
    state[curr++]=ans;

}

char GetLetter(int P) {

    return ans[P];

}


/*

14
T a
T b
P 1
T d
U 2
U 1
P 2
T e
U 1
U 5
T c
P 2
U 2
P 2

*/
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...