| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 988500 | huutuan | Crayfish scrivener (IOI12_scrivener) | C++14 | 358 ms | 129184 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int N=1e6+10, LG=20;
int dep[N], up[LG][N], node[N];
char a[N];
vector<int> g[N];
int cur, cnt;
void Init() {
cur=0, cnt=0;
}
void TypeLetter(char L) {
a[++cnt]=L;
g[cur].push_back(cnt);
dep[cnt]=dep[cur]+1;
up[0][cnt]=cur;
for (int k=1; k<LG; ++k) up[k][cnt]=up[k-1][up[k-1][cnt]];
cur=cnt;
node[cnt]=cur;
}
void UndoCommands(int U) {
++cnt;
cur=node[cnt-U-1];
node[cnt]=cur;
}
char GetLetter(int P) {
int d=dep[cur]-P-1;
int u=cur;
for (int k=0; k<LG; ++k) if (d>>k&1) u=up[k][u];
return a[u];
}
| # | 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... | ||||
