# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
115595 | 2019-06-08T09:19:27 Z | faustaadp | 크레이피쉬 글쓰는 기계 (IOI12_scrivener) | C++17 | 628 ms | 72312 KB |
#include<bits/stdc++.h> typedef long long ll; #define pb push_back #define mp make_pair #define fi first #define se second using namespace std; pair<char,int> A[1000001]; int te,X; int p[19][1000001],ii; void Init() { return ; //for(ii=1;ii<=1000002;ii++) // LO[ii]=ceil(log(ii)/log(2)); } void TypeLetter(char L) { if(te==0) { A[te]=mp(L,0); p[0][te]=0; } else { A[te]=mp(L,A[te-1].se+1); p[0][te]=te-1; for(ii=1;ii<19;ii++) p[ii][te]=p[ii-1][p[ii-1][te]]; } te++; return ; } void UndoCommands(int U) { A[te]=A[te-U-1]; //p[0][te]=p[0][te-U-1]; for(ii=0;ii<19;ii++) p[ii][te]=p[ii][te-U-1]; te++; return ; } char GetLetter(int P) { X=te-1; for(ii=18;ii>=0;ii--) if(A[p[ii][X]].se>P) X=p[ii][X]; else if(A[p[ii][X]].se==P) return A[p[ii][X]].fi; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | 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 | 2 ms | 512 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 640 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 371 ms | 59360 KB | Output is correct |
2 | Correct | 375 ms | 72312 KB | Output is correct |
3 | Incorrect | 389 ms | 71828 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 628 ms | 54524 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |