Submission #1009060

#TimeUsernameProblemLanguageResultExecution timeMemory
1009060RifalCrayfish scrivener (IOI12_scrivener)C++14
34 / 100
1079 ms1548 KiB
#include<bits/stdc++.h> using namespace std; vector<pair<int,char>> v; string cur; void Init() {} void TypeLetter(char L) { v.push_back({-1,L}); cur.push_back(L); } void UndoCommands(int U) { int cnt = 0; cur.clear(); v.push_back({U,' '}); 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()); } char GetLetter(int P) { 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...