Submission #911503

#TimeUsernameProblemLanguageResultExecution timeMemory
911503Muhammad_AneeqCrayfish scrivener (IOI12_scrivener)C++17
34 / 100
1045 ms8264 KiB
#include <string> #include <algorithm> using namespace std; int const N=1e6+10; char com[N]={}; int ind[N]={}; int num=0; void Init() { com[num]=' '; ind[0]=0; } void TypeLetter(char L) { num++; com[num]=L; ind[num]=num; } void UndoCommands(int U) { ind[num+1]=ind[num-U]; com[num+1]=com[num-U]; num++; } char GetLetter(int P) { string g; int i=ind[num]; while (i!=0) { g+=com[i]; i=ind[i-1]; } reverse(begin(g),end(g)); return g[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...