# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
98737 | 2019-02-25T13:45:44 Z | Alexa2001 | 크레이피쉬 글쓰는 기계 (IOI12_scrivener) | C++17 | 417 ms | 65696 KB |
#include <bits/stdc++.h> using namespace std; const int Nmax = 1e6 + 5, lg = 20; int nodes, t[lg+2][Nmax], up[Nmax], frst_up[Nmax]; char letter[Nmax]; void Init() { } void TypeLetter(char L) { letter[++nodes] = L; t[0][nodes] = nodes - 1; up[nodes] = up[nodes - 1] + 1; frst_up[nodes] = nodes; int i; for(i=1; i<=lg; ++i) t[i][nodes] = t[i-1][t[i-1][nodes]]; } void UndoCommands(int U) { int cursor = nodes - U, i; t[0][nodes + 1] = cursor; up[++nodes] = up[cursor]; frst_up[nodes] = frst_up[cursor]; } char GetLetter(int P) { int i, x = frst_up[nodes]; ++P; for(i=lg; i>=0; --i) if(up[t[i][x]] >= P) x = t[i][x]; return letter[x]; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 512 KB | Output is correct |
2 | Correct | 2 ms | 512 KB | Output is correct |
3 | Correct | 3 ms | 512 KB | Output is correct |
4 | Correct | 2 ms | 512 KB | Output is correct |
5 | Correct | 2 ms | 512 KB | Output is correct |
6 | Correct | 2 ms | 512 KB | Output is correct |
7 | Correct | 3 ms | 512 KB | Output is correct |
8 | Correct | 2 ms | 512 KB | Output is correct |
9 | Correct | 3 ms | 512 KB | Output is correct |
10 | Correct | 3 ms | 484 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 512 KB | Output is correct |
2 | Incorrect | 2 ms | 512 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 640 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 324 ms | 65696 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 417 ms | 60328 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |