# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
44736 | PowerOfNinjaGo | Factories (JOI14_factories) | C++11 | 6038 ms | 104616 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.
//Power Of Ninja Go
#include <bits/stdc++.h>
#ifdef atom
#include "grader.cpp"
#else
#include "factories.h"
#endif
using namespace std;
typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector< ii > vii;
#define X first
#define Y second
#define pb push_back
const int maxn = 5e5+5;
vii adj[maxn];
int dp[22][maxn];
int h[maxn];
int par[maxn];
ll sweep[maxn];
int cnt[maxn];
bool use[maxn];
ll bst[maxn];
void trv(int u, int p)
{
for(auto edge : adj[u])
{
int v = edge.X, w = edge.Y;
if(v != p)
{
h[v] = h[u]+1;
dp[0][v] = u;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |