제출 #61831

#제출 시각아이디문제언어결과실행 시간메모리
61831theknife2001크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++17
12 / 100
1093 ms2076 KiB
#include <bits/stdc++.h> #define ii pair < char , char > #define fi first #define se second using namespace std; const int N=1e6+5; ii a[N]; char s[N]; int cnt; int i; void Init() {} void TypeLetter(char L) { a[i].fi='T'; a[i].se=L; i++; } void UndoCommands(int U) { a[i].fi='U'; a[i].se='0'+U; i++; } char GetLetter(int P) { if(cnt==0) { int j=0; for(int k=i-1;k>=0;k--) { if(a[k].fi=='T') { s[j]=a[k].se; j++; } else { k-=(a[k].se-'0'); } } reverse(s,s+j); } // cnt=1; 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...