# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1047785 | aykhn | Split the Attractions (IOI19_split) | C++17 | 1 ms | 3676 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 "split.h"
#include <bits/stdc++.h>
using namespace std;
const int MXN = 1e5 + 5;
int n;
vector<int> ans;
vector<int> adj[MXN];
array<int, 2> col[3];
int sz[MXN], par[MXN], r;
int used[MXN], cnt;
void dfs(int a, int p)
{
par[a] = p;
sz[a] = 1;
for (int &v : adj[a])
{
if (v == p) continue;
sz[a] += sz[v];
}
if (sz[a] >= col[0][0] && n - sz[a] >= col[1][0]) r = a;
}
void dfs1(int a, int del, int c)
{
if (cnt >= col[c][0]) return;
used[a] = 1;
ans[a] = col[c][1];
Compilation message (stderr)
# | 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... |