# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
310056 | Lemur95 | Stations (IOI20_stations) | C++17 | 1202 ms | 1256 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"
#pragma GCC optimize("Ofast")
#define x first
#define y second
#define ld long double
#define ll long long
using namespace std;
vector <int> g[1005];
int nr;
void dfs(int nod, int h, int tata, vector <int> &labels) {
if(h % 2 == 0)
labels[nod] = nr++;
for(auto &fiu : g[nod]) {
if(fiu != tata)
dfs(fiu, h + 1, nod, labels);
}
if(h % 2)
labels[nod] = nr++;
}
vector <int> label(int n, int k, vector <int> u, vector <int> v) {
vector <int> labels(n);
for(int i = 0; i < n; i++)
g[i].clear();
nr = 0;
for(int 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... |