# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
517326 | couplefire | Construction of Highway (JOI18_construction) | C++17 | 1126 ms | 129992 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;
typedef long long ll;
typedef pair<int, int> pii;
#define fi first
#define se second
#define mp make_pair
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const int N = (int)1e5 + 10;
int A[N], B[N], C[N];
vector<int> T[N];
int subt[N];
int dep[N];
int link[N];
int par[N];
void dfs(int u){
subt[u]=1;
for(auto x : T[u]){
dep[x]=dep[u]+1;
par[x]=u;
dfs(x);
subt[u]+=subt[x];
}
}
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... |