# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
202039 | HellAngel | Split the Attractions (IOI19_split) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int maxn = 100007;
int ans, sz[maxn], n, m;
int col[maxn];
pair<int, int> a[4];
vector<int> vt[maxn];
void DFS(int u, int p)
{
sz[u] = 1;
for(auto v: vt[u])
{
if(v != p)
{
DFS(v, u);
sz[u] += sz[v];
}
}
}
int FindCen(int u, int p)
{
int Big = -1;
bool ok = true;
for(auto v: vt[u])
{
if(v == p) continue;
if(sz[v] * 2 > sz[1]) ok = false;