Submission #62569

#TimeUsernameProblemLanguageResultExecution timeMemory
62569zetapiCrayfish scrivener (IOI12_scrivener)C++14
60 / 100
1082 ms68772 KiB
const int MAX=1e6+5; char X[MAX]; int ind,tot,arr[MAX],height[MAX],Parent[MAX][22]; void Init() { return ; } void TypeLetter(char L) { X[++ind]=L; Parent[ind][0]=arr[tot++]; height[ind]=height[Parent[ind][0]]+1; for(int A=1;A<20;A++) Parent[ind][A]=Parent[Parent[ind][A-1]][A-1]; arr[tot]=ind; return ; } void UndoCommands(int U) { ++tot; arr[tot]=arr[tot-U-1]; return ; } char GetLetter(int P) { int res=arr[tot]; for(int A=19;A>=0;A--) { if(height[Parent[res][A]]>P) res=Parent[res][A]; } return X[res]; }
#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...