Submission #1187924

#TimeUsernameProblemLanguageResultExecution timeMemory
1187924lance0Crayfish scrivener (IOI12_scrivener)C++20
100 / 100
410 ms223620 KiB
#include <ext/rope> __gnu_cxx::crope ver[1000010]; //set up all versions with rope data struct int curr_ver = 0; //and track version number void Init(){} void TypeLetter(char L) { //newest version is just previous version + new char curr_ver++; ver[curr_ver] = ver[curr_ver-1] + L; } void UndoCommands(int U) { //using the fact undos are just jumps to U steps back, newest version = U steps back from last version curr_ver++; ver[curr_ver] = ver[curr_ver-1-U]; } char GetLetter (int P) { //Pth letter is simply current version's Pth letter return ver[curr_ver][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...