제출 #1066710

#제출 시각아이디문제언어결과실행 시간메모리
1066710Luvidi크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++17
26 / 100
1010 ms262144 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-1,'.'}; } 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...