제출 #577187

#제출 시각아이디문제언어결과실행 시간메모리
577187AngusWong크레이피쉬 글쓰는 기계 (IOI12_scrivener)C++17
26 / 100
182 ms17896 KiB
#include <bits/stdc++.h> #define f first #define s second using namespace std; string s; vector<pair<int, pair<char, int> > > op; void Init() { s="!"; op.clear(); } void TypeLetter(char L) { op.push_back({1, {L, 0}}); } void UndoCommands(int U) { op.push_back({2, {' ', U}}); } char GetLetter(int P) { if (s=="!"){ s=""; for (int i=op.size()-1; i>=0; i--){ if (op[i].f==1) s+=op[i].s.f; else i-=op[i].s.s; } 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...