제출 #911503

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