Submission #1232952

#TimeUsernameProblemLanguageResultExecution timeMemory
1232952yixuan19크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++20
34 / 100
159 ms327680 KiB
#include <iostream>
#include <vector>
char last;

using namespace std;

vector<vector<char> > commands;

void Init() {
  vector<char> empty;
  commands.push_back(empty);
 //cout<<"init done"<<endl;
}


void TypeLetter(char L) {
  vector<char> last = commands[commands.size()-1];
  last.push_back(L);
  commands.push_back(last);
  //cout<<"letter added"<<endl;

}

void UndoCommands(int U) {
  vector<char> last = commands[commands.size()-U-1];
  commands.push_back(last);
  //cout<<U<<" commands undone"<<endl;
}

char GetLetter(int P) {
  return commands[commands.size()-1][P];
}
#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...