제출 #1009108

#제출 시각아이디문제언어결과실행 시간메모리
1009108Rifal크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++14
26 / 100
98 ms10692 KiB
#include<bits/stdc++.h> #define fi first #define se second using namespace std; vector<pair<int,char>> v; string cur; bool ok = false; void Init() {} void TypeLetter(char L) { v.push_back({-1,L}); } void UndoCommands(int U) { v.push_back({U,' '}); } char GetLetter(int P) { if(ok == false) { ok = true; int cnt = 0; for(int i = v.size()-1; i >= 0; i--) { if(cnt > 0) { cnt--; continue; } if(v[i].first == -1) { cur.push_back(v[i].second); } else { cnt = v[i].first; } } reverse(cur.begin(),cur.end()); } return cur[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...