# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
744695 | emptypringlescan | Passport (JOI23_passport) | C++17 | 1269 ms | 145780 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;
int cnd;
vector<pair<int,int> > adj[800005];
struct node{
int s,e,m;
int nd;
node *l,*r;
node(int S, int E){
s=S; e=E; m=(s+e)/2;
nd=cnd;
cnd++;
if(s!=e){
l=new node(s,m);
r=new node(m+1,e);
adj[l->nd].push_back({nd,0});
adj[r->nd].push_back({nd,0});
}
else{
adj[s].push_back({nd,0});
}
}
void addedge(int S, int E, int N){
if(S<=s&&e<=E){
adj[nd].push_back({N,1});
return;
}
if(E<=m) l->addedge(S,E,N);
else if(S>m) r->addedge(S,E,N);
else{
# | 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... |