Submission #1016354

#TimeUsernameProblemLanguageResultExecution timeMemory
1016354FaggiCrayfish scrivener (IOI12_scrivener)C++11
31 / 100
110 ms12164 KiB
#include <bits/stdc++.h> using namespace std; string s; vector<int>borr; bool band=1; void Init() { s=""; } void TypeLetter(char L) { s+=L; borr.push_back(0); } void UndoCommands(int U) { s+='0'; borr.push_back(U); } void arm() { string res=""; for(int i=int(s.size())-1; i>=0; i--) { if(s[i]!='0') { res+=s[i]; } else { i-=borr[i]; } } s=""; for(int i=int(res.size())-1; i>=0; i--) { s+=res[i]; } } char GetLetter(int P) { if(band) arm(); band=0; 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...