# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
714910 | study | Synchronization (JOI13_synchronization) | C++17 | 752 ms | 28264 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;
const int N = 1e5;
vector<int> adj[N];
int tin[N],tout[N],segt[2*N],pere[20][N],res[N],status[N],depth[N],sync[N],queries[N];
int t = 0;
void dfs(int node, int p, int d){
tin[node] = t;
depth[node] = d;
t++;
for (int i:adj[node]){
if (i != p){
pere[0][i] = node;
dfs(i,node,d+1);
}
}
tout[node] = t;
}
void modify(int node, int val){
node += N;
segt[node] += val;
node >>= 1;
while (node){
segt[node] = segt[2*node]+segt[2*node+1];
node >>= 1;
}
# | 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... |