제출 #433435

#제출 시각아이디문제언어결과실행 시간메모리
433435aris12345678Crayfish scrivener (IOI12_scrivener)C++14
34 / 100
177 ms262148 KiB
#include <bits/stdc++.h>
using namespace std;

const int mxN = 1000005;
string ans;
vector<string> undo;

void Init() {
    return;
}

void TypeLetter(char l) {
    ans += l;
    undo.push_back(ans);
}

void UndoCommands(int u) {
    ans = undo[undo.size()-u-1];
    undo.push_back(ans);
}

char GetLetter(int p){
    return ans[p];
}

/*
int main() {
    Init();
    TypeLetter('a');
    cout << ans << "\n";
    TypeLetter('b');
    cout << ans << "\n";
    cout << GetLetter(1) << "\n";
    TypeLetter('d');
    cout << ans << "\n";
    UndoCommands(2);
    cout << ans << "\n";
    UndoCommands(1);
    cout << ans << "\n";
    cout << GetLetter(2) << "\n";
    TypeLetter('e');
    cout << ans << "\n";
    UndoCommands(1);
    cout << ans << "\n";
    UndoCommands(5);
    cout << ans << "\n";
    TypeLetter('c');
    cout << ans << "\n";
    cout << GetLetter(2) << "\n";
    UndoCommands(2);
    cout << ans << "\n";
    cout << GetLetter(2) << "\n";
    return 0;
}
*/
#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...