# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
422001 | Lobo | 크레이피쉬 글쓰는 기계 (IOI12_scrivener) | C++17 | 162 ms | 26240 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const long long INFll = 1e18+10;
const int INFii = 1e9+10;
typedef long long ll;
typedef int ii;
typedef double dbl;
#define endl '\n'
#define sc second
#define fr first
#define mp make_pair
#define pb push_back
#define maxn 110000
#define log 25
//LEMBRAR DE MUDAR
ii n, tmp, p[maxn][log], t[maxn], h[maxn];
char c[maxn];
void TypeLetter(char L) {
n++;
tmp++;
t[tmp] = n;
c[n] = L;
p[n][0] = t[tmp-1];
h[n] = h[t[tmp-1]] + 1;
for(ii i = 1; i <= log; i++) {
p[n][i] = p[p[n][i-1]][i-1];
}
//cout << L << " " << n << " " << tmp << " -> " << h[n] << endl;
}
void UndoCommands(int U) {
tmp++;
t[tmp] = t[tmp-U-1];
}
char GetLetter(int P) {
ii u = t[tmp];
P = h[tmp]-P-1;
for(ii i = log; i >= 0; i--) {
if(P-(1<<i) >= 0) {
P-= (1<<i);
u = p[u][i];
}
}
return c[u];
}
void Init() {
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |