# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
959180 | andrei_boaca | Capital City (JOI20_capital_city) | C++17 | 3033 ms | 382160 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;
typedef pair<int,int> pii;
int n,k,nr[200005];
bool use[200005];
vector<int> mynodes[200005];
int cul[200005];
vector<int> muchii[200005];
vector<int> edges[200005];
vector<pii> g;
vector<int> st;
vector<pii> init;
int comp[200005],nrcul[200005],nrcomp,nrnodes[200005],nrmuchii[200005];
int root;
void dfs1(int nod)
{
use[nod]=1;
for(int i:edges[nod])
if(!use[i])
dfs1(i);
st.push_back(nod);
}
void dfs2(int nod)
{
use[nod]=1;
comp[nod]=nrcomp;
nrcul[nrcomp]++;
for(int i:edges[nod])
if(!use[i])
# | 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... |