# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
52310 | Diuven | Factories (JOI14_factories) | C++11 | 7532 ms | 351568 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 "factories.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
const int MX=500010, LG=20;
const ll inf=2e17;
struct edge {
int to; ll co;
};
int n, dep[MX];
vector<edge> G[MX];
vector<edge> C, D[MX];
bool done[MX];
int sub[MX];
void dfs(int v, int p=-1){
sub[v]=1;
for(edge &e:G[v]){
int x=e.to;
if(done[x] || x==p) continue;
dfs(x,v);
sub[v]+=sub[x];
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |