# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
31142 | cscandkswon | 크레이피쉬 글쓰는 기계 (IOI12_scrivener) | C++14 | 703 ms | 92976 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int MAXN=1000005;
int N, nod, now, cmd;
int spt[MAXN][21], A[MAXN], L[MAXN];
char let[MAXN];
void Init() {}
void TypeLetter(char c) {
int i, p;
A[++cmd]=now;
let[++nod]=c;
L[nod]=L[now]+1;
spt[nod][0]=now;
now=nod;
for(i=1, p=now; ; i++){
if(spt[spt[p][i-1]][i-1]==0) break;
spt[p][i]=spt[spt[p][i-1]][i-1];
}
}
void UndoCommands(int U) {
A[++cmd]=now;
now=A[cmd-U];
}
char GetLetter(int P) {
int i, p=now, q=L[now]-P-1;
for(i=20; i>=0; i--)if((1<<i)&q){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |