Submission #577187

#TimeUsernameProblemLanguageResultExecution timeMemory
577187AngusWongCrayfish scrivener (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...