# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
70929 | FLDutchman | Crayfish scrivener (IOI12_scrivener) | C++14 | 910 ms | 99476 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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++)
char nodes[1000100]; int sz[1000100];
int lift[1000100][21];
int numVersions = 0;
int insert(int l, char c){
int ver = numVersions++;
nodes[ver] = c;
sz[ver] = sz[l]+1;
//cerr<<getsz(l) << " " << l->lift.size() << endl;
int i = 0;
while(true){
//cout<<getsz(l)<<endl;
lift[ver][i] = l;
//cout<<nl->lift.size()<<endl;
if(lift[l][i] == -1) return ver;
l = lift[l][i++];
}
}
char getletter(int l, int i){
//cerr<<getsz(l) << " " << l->lift.size() << endl;
FOR(k, 0, 21) if(i & (1<<k)) l = lift[l][k];
return nodes[l];
# | 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... |