# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
146814 | Bodo171 | Split the Attractions (IOI19_split) | C++14 | 110 ms | 15840 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 <vector>
#include <iostream>
#include <algorithm>
using namespace std;
const int nmax=100005;
pair<int,int> col[5];
vector<int> res;
vector<int> v[nmax],ad[nmax];
int l[nmax],r[nmax],rep[nmax],w[nmax],pond[nmax],big[nmax],q[nmax],viz[nmax],valid[nmax],tt[nmax];
int nr,x,sum,p,u,i,j,k,nod,A,act,gasit,n,cen;
void dfs(int x)
{
rep[++nr]=x;l[x]=nr;
w[x]=1;
for(int i=0;i<v[x].size();i++)
if(!w[v[x][i]])
{
dfs(v[x][i]);
w[x]+=w[v[x][i]];
big[x]=max(big[x],w[v[x][i]]);
}
r[x]=nr;
}
void bfs(int x)
{
q[u=1]=x;sum=pond[x];
for(p=1;p<=u;p++)
{
x=q[p];
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... |