# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
236324 | nicolaalexandra | Regions (IOI09_regions) | C++14 | 8064 ms | 35640 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>
#define DIM 200010
#define DIMR 25010
#define INF 2000000000
using namespace std;
vector <int> L[DIM],v[DIMR];
int c[DIM],f[DIM];
pair <int,int> poz[DIM],w[DIMR];
int ans[510][DIMR];
int n,r,q,i,x,r1,r2,k;
void dfs (int nod, int tata){
//E[++k] = nod;
k++;
v[c[nod]].push_back(nod);
poz[nod].first = k;
for (auto vecin : L[nod]){
if (vecin != tata)
dfs (vecin,nod);
}
poz[nod].second = k;
}
int main (){
//ifstream cin ("date.in");
//ofstream cout ("date.out");
cin>>n>>r>>q;
cin>>c[1];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |