| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1369413 | zhivko | Split the Attractions (IOI19_split) | C++20 | 529 ms | 1114112 KiB |
#include<bits/stdc++.h>
#include "split.h"
using namespace std;
int n,a,b;
int m;
vector<int>v[100001];
bool used[100001];
int sz[100001];
void dfs_fein(int node,int p)
{
sz[node]=1;
for(int& i:v[node])
{
if(i==p||used[i])continue;
dfs_fein(i,node);
sz[node]+=sz[i];
}
}
int h=0;
bool cmp(int a,int b)
{
return sz[a]>sz[b];
}
int find_cent(int node)
{
for(int& i:v[node])
{
if(used[i])continue;
if(sz[i]>=h)return find_cent(i);
else return node;
}
return node;
}
void decomp(int node)
{
dfs_fein(node,-1);
h=(sz[node]+1)/2;
int c=find_cent(node);
}
vector<int> find_split(int N, int A, int B, int C, vector<int> p, vector<int> q)
{
n=N;
a=A;
b=B;
m=p.size();
for(int i=0;i<m;i++)
{
v[p[i]].push_back(q[i]);
v[q[i]].push_back(p[i]);
}
decomp(1);
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
