# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
205533 | GioChkhaidze | Synchronization (JOI13_synchronization) | C++14 | 406 ms | 18152 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>
#define Tree int h,int l,int r
#define Left (h<<1),l,(l+r)>>1
#define Right ((h<<1)|1),((l+r)>>1)+1,r
#define F first
#define S second
using namespace std;
const int N=1e5+5;
int n,m,q,timer,depth;
int in[N],out[N],O[N],dep[N],ANS[N],last[N];
int v[8*N];
bool Bol[2*N];
vector < int > V[N];
void Dfs(int x,int p) {
dep[x]=++depth;
in[x]=++timer,O[in[x]]=x;
for (int i=0; i<V[x].size(); i++) {
int to=V[x][i];
if (to!=p) Dfs(V[x][i],x);
}
out[x]=timer,--depth;
}
void Build(Tree) {
if (l==r) {
v[h]=out[O[l]];
return ;
}
Build(Left),Build(Right);
Compilation message (stderr)
# | 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... |