제출 #1066695

#제출 시각아이디문제언어결과실행 시간메모리
1066695Luvidi크레이피쉬 글쓰는 기계 (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...