Submission #1269171

#TimeUsernameProblemLanguageResultExecution timeMemory
1269171nerrrminCrayfish scrivener (IOI12_scrivener)C++20
34 / 100
148 ms327680 KiB
#include<bits/stdc++.h> #define pb push_back using namespace std; const int maxn = 2e6 + 10; char last; int n; string onv[maxn]; vector < int > g; int curr; void Init() { n = 1; onv[1] = ""; curr = 1; g.pb(1); } void TypeLetter(char L) { last = L; n ++; string pre = onv[curr]; onv[n] = pre + L; curr = n; g.pb(curr); } void UndoCommands(int U) { int sz = g.size()-1; curr = g[sz - U]; g.pb(curr); } char GetLetter(int P) { int state = curr; return onv[state][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...