# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1174279 | heeheeheehaaw | Homework (CEOI22_homework) | C++20 | 186 ms | 169648 KiB |
#include <bits/stdc++.h>
using namespace std;
int parent[2000005];
int tip[2000005];
int hei, cnt, n;
vector<int> adj[2000005];
int cdr, siz[2000005];
void dfs(int nod, int nr = 0)
{
if(tip[nod] == 0) siz[nod] = 1, nr++;
for(auto it : adj[nod])
{
dfs(it, nr);
siz[nod] += siz[it];
}
if(tip[nod] == 0) nr--;
if(nr == 0)
cdr = max(cdr, n - siz[nod]);
}
signed main()
{
ios_base::sync_with_stdio(false);
cin.tie(0), cout.tie(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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |