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 "stations.h"
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 20;
vector<int> adj[maxn];
int tin[maxn];
int tout[maxn];
int dfs_t;
void dfs(int u, int p) {
tin[u] = ++dfs_t;
for (auto v: adj[u]) {
if (v != p) {
dfs(v, u);
}
}
tout[u] = dfs_t;
}
vector<int> label(int n, int k, vector<int> u, vector<int> v) {
vector<int> labels(n);
for (int i = 0; i < n; i++) {
labels[i] = i;
}
return labels;
}
int find_next_station(int s, int t, vector<int> c) {
while (t != 0) {
if ((t - 1) / 2 == s) {
return t;
}
t = (t - 1) / 2;
}
return (s - 1) / 2;
}
# | 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... |