# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
62505 | 2018-07-28T20:04:14 Z | zetapi | 크레이피쉬 글쓰는 기계 (IOI12_scrivener) | C++14 | 372 ms | 4944 KB |
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define ll long long #define itr ::iterator typedef pair<int,int> pii; const int MAX=1e5; char last; char X[MAX]; int ind,size[MAX],par[MAX]; void Init() { } void TypeLetter(char L) { ++ind; X[ind]=L; par[ind]=ind-1; size[ind]=size[par[ind]]+1; return ; } void UndoCommands(int U) { ++ind; par[ind]=ind-U-1; size[ind]=size[par[ind]]; return ; } char GetLetter(int P) { P++; int cur=ind; while(cur) { if(size[cur]==P and X[cur]>='a' and X[cur]<='z') return X[cur]; cur=par[cur]; } } /*signed main() { ios_base::sync_with_stdio(false); TypeLetter('a'); TypeLetter('b'); TypeLetter('d'); UndoCommands(2); UndoCommands(1); cout<<GetLetter(2); //cout<<ind<<" "<<par[ind]<<"\n"; return 0; }*/
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 376 KB | Output is correct |
2 | Correct | 2 ms | 376 KB | Output is correct |
3 | Correct | 2 ms | 428 KB | Output is correct |
4 | Correct | 2 ms | 480 KB | Output is correct |
5 | Correct | 3 ms | 480 KB | Output is correct |
6 | Correct | 2 ms | 564 KB | Output is correct |
7 | Correct | 2 ms | 568 KB | Output is correct |
8 | Correct | 3 ms | 700 KB | Output is correct |
9 | Correct | 3 ms | 728 KB | Output is correct |
10 | Correct | 3 ms | 728 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 728 KB | Output is correct |
2 | Correct | 3 ms | 728 KB | Output is correct |
3 | Correct | 4 ms | 728 KB | Output is correct |
4 | Correct | 3 ms | 728 KB | Output is correct |
5 | Correct | 3 ms | 728 KB | Output is correct |
6 | Correct | 3 ms | 728 KB | Output is correct |
7 | Correct | 2 ms | 728 KB | Output is correct |
8 | Correct | 2 ms | 728 KB | Output is correct |
9 | Correct | 2 ms | 728 KB | Output is correct |
10 | Correct | 3 ms | 728 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 728 KB | Output is correct |
2 | Correct | 6 ms | 728 KB | Output is correct |
3 | Correct | 5 ms | 804 KB | Output is correct |
4 | Correct | 4 ms | 848 KB | Output is correct |
5 | Correct | 4 ms | 892 KB | Output is correct |
6 | Correct | 3 ms | 900 KB | Output is correct |
7 | Correct | 4 ms | 940 KB | Output is correct |
8 | Correct | 4 ms | 1108 KB | Output is correct |
9 | Correct | 6 ms | 1108 KB | Output is correct |
10 | Correct | 5 ms | 1108 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 53 ms | 4172 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 372 ms | 4944 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |