# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
70921 | 2018-08-23T17:15:28 Z | FLDutchman | Crayfish scrivener (IOI12_scrivener) | C++14 | 208 ms | 68144 KB |
#include <bits/stdc++.h> using namespace std; #define pb push_back #define fast_io() ios::sync_with_stdio(false) #define FOR(i, l, r) for(int i = (l); i < (r); i++) struct llist{ vector<llist*> lift; char c; int sz = 1; llist (char c) : c(c){} }; int getsz(llist *l) { if(!l) return 0; return l->sz; } llist *insert(llist* l, char c){ llist *nl = new llist(c); nl->sz = getsz(l)+1; if(!l) return nl; int i = 0; while(l->lift.size() > i){ nl->lift.pb(l); l = l->lift[i++]; } return nl; } char getletter(llist *l, int i){ FOR(k, 0, 21) if(i & (1<<k)) l = l->lift[k]; return l->c; } vector <llist*> v; void Init() { v.pb(0); } void TypeLetter(char L) { v.pb(insert(v.back(), L)); } void UndoCommands(int U) { v.pb(v[v.size()-1-U]); } char GetLetter(int P) { auto l = v.back(); return getletter(l, getsz(l)-1 - P); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 688 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 2 ms | 740 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 208 ms | 68144 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 18 ms | 68144 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |