# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
294629 | Alexa2001 | Power Plant (JOI20_power) | C++17 | 1190 ms | 29940 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 Nmax = 2e5 + 5;
string is_plant;
vector<int> v[Nmax];
bool used[Nmax];
int dp[Nmax];
int w[Nmax];
int ans = 1;
int n, All;
void dfs0(int node, int dad = 0)
{
w[node] = 1;
for(auto it : v[node])
if(!used[it] && it != dad)
{
dfs0(it, node);
w[node] += w[it];
}
}
int centroid(int node, int dad = 0)
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |