Submission #1066695

#TimeUsernameProblemLanguageResultExecution timeMemory
1066695LuvidiCrayfish scrivener (IOI12_scrivener)C++17
0 / 100
56 ms15260 KiB
#include <bits/stdc++.h> using namespace std; const int maxq=1e6; pair<int,char> pre[maxq+1]; int curr; string s; void Init() { } void TypeLetter(char l) { curr++; pre[curr]={curr-1,l}; } void UndoCommands(int u) { curr++; pre[curr]={curr-u,'.'}; } char GetLetter(int p) { if(curr){ while(curr){ if(pre[curr].second!='.')s+=pre[curr].second; curr=pre[curr].first; } reverse(s.begin(),s.end()); } return s[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...