# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
286702 | amiratou | Parachute rings (IOI12_rings) | C++14 | 2838 ms | 177920 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 <bits/stdc++.h>
using namespace std;
#define pb push_back
#define sz(x) (int)(x.size())
const int MX = (int)(1e6+3);
typedef pair<int,int> ii;
int N,degree[MX],id[MX],idx,t=1;
vector<int> vec[MX];
multiset<int,greater<int> > comp[MX];
int vis[MX];
void Init(int N_) {
N = N_;
}
void Link(int A, int B) {
vec[A].pb(B),vec[B].pb(A);
degree[A]++,degree[B]++;
}
void dfs(int node,int k=0){
vis[node]=t;
if(!k){
id[node]=idx;
comp[idx].insert(degree[node]);
}
for(auto it:vec[node])
if(vis[it]!=t)dfs(it,k);
}
int gimme(int node){
# | 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... |