# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
899087 | Denkata | Factories (JOI14_factories) | C++14 | 4550 ms | 240212 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>
#include "factories.h"
//#include "grader.cpp"
using namespace std;
const int maxn = 5e5+3;
int i,j,p,q,n,m,k,par[maxn],sz[maxn],tin[maxn],tout[maxn],br,l,timer,lasttime[maxn],cnt;
long long ans[maxn],raz[maxn];
vector <int> up[maxn];
///moje i set
struct Put
{
int v;
long long d;
};
bool operator<(Put a,Put b)
{
return a.v<b.v;
}
set <Put> v[maxn];
void dfs(int u,int p)
{
tin[u]=++timer;
up[u][0]=p;
for(int j=1;j<=l;j++)
{
up[u][j]=up[up[u][j-1]][j-1];
}
for(auto i:v[u])
{
int q=i.v;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |