# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
316197 | ScarletS | Stations (IOI20_stations) | C++17 | 964 ms | 1336 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 pii pair<int,int>
#define f first
#define s second
using namespace std;
const int maxn = 1e3;
int tin[maxn],tout[maxn],t;
vector<int> edges[maxn];
vector<pii> temp;
void dfs(int c, int p, bool h)
{
tin[c]=++t;
for (int i : edges[c])
if (i!=p)
dfs(i,c,h^1);
tout[c]=++t;
if (h)
temp.push_back({tout[c],c});
else
temp.push_back({tin[c],c});
}
vector<int> label(int n, int k, vector<int> u, vector<int> v)
{
vector<int> labels(n);
for (int i=0;i<n;++i)
edges[i].clear();
for (int i=0;i<n-1;++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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |