# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
718324 | bebra | Split the Attractions (IOI19_split) | C++17 | 0 ms | 0 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;
using ll = long long;
#define dbg(x) cerr << #x << ": " << x << endl;
const int MAX_N = 1e5 + 5;
vector<int> g[MAX_N];
int color[MAX_N];
bool block[MAX_N];
int sz[MAX_N];
int n;
int val[3];
int order[3];
void dfs_color(int v, int p, int c, int& cnt) {
if (cnt == 0) {
return;
}
--cnt;
color[v] = c;
for (auto u : g[v]) {
if (u == p || block[u]) continue;
dfs_color(u, v, c, cnt);
}
}