Submission #425891

#TimeUsernameProblemLanguageResultExecution timeMemory
425891AzimjonCrayfish scrivener (IOI12_scrivener)C++17
34 / 100
139 ms262148 KiB
#include <bits/stdc++.h> using namespace std; const int N = 1111111; int p[N], v[N], u[N]; string q[N]; string s; int cnt = 0; void Init() { p[0] = -1; v[0] = '-'; u[0] = 0; q[0] = ""; } void TypeLetter(char L) { int id = ++cnt; p[id] = cnt - 1; v[id] = L; u[id] = u[cnt - 1] + 1; q[id] = q[cnt - 1] + L; s.push_back(L); } void UndoCommands(int U) { int par = cnt - U; int id = ++cnt; p[id] = par; v[id] = '-'; u[id] = u[par]; q[id] = q[par]; // for (int i = 0; i <= 20; i++) { // cout << p[i] << " "; // } // cout << endl; // for (int i = 0; i <= 20; i++) { // cout << (char)v[i] << " "; // } // cout << endl; } char GetLetter(int P) { return q[cnt][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...