# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
320506 | Ambok | Stations (IOI20_stations) | C++14 | 1002 ms | 1376 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>
#include "stations.h"
using namespace std;
int coun=0;
vector < vector <int> > vec(2000);
vector <int> L(2000);
void dfs (int x, int y, int h)
{
if (h%2==0) L[x]=coun;
coun++;
for (int i=0; i<vec[x].size(); i++)
{
if (vec[x][i]==y) continue;
dfs(vec[x][i], x, h+1);
}
if (h%2==1) L[x]=coun;
h--; coun++;
}
vector <int> label(int n, int k, vector <int> u, vector <int> v)
{
int s, h, i;
L.resize(n);
vec.resize(n);
for (i=0; i<n; i++)
{
vec[i].clear();
}
for (i=0; i<n-1; i++)
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... |