# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
615915 | eNGy | Stations (IOI20_stations) | C++17 | 986 ms | 740 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 con(x) (cerr << __LINE__ << ": " << #x << ' ' << (x) << endl, (x))
#define vis() (cerr << __LINE__ << endl)
#define ll long long
#define f first
#define s second
#define pb push_back
#define rsz resize
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define mp make_pair
using namespace std;
void dfs(int n, int p, int d, int &e, vector<int> &L, vector<vector<int>> &G){
if(d%2 == 0) L[n] = e++;
for(int v: G[n]){
if(v != p){
dfs(v, n, d+1, e, L, G);
}
}
if(d%2 != 0) L[n] = e++;
}
std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v){
vector<vector<int>> G(n);
for(int i=0; i<n-1; i++){
G[u[i]].pb(v[i]);
G[v[i]].pb(u[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... |