# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
625526 | JustInCase | Stations (IOI20_stations) | C++17 | 926 ms | 796 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 "stations.h"
#include <vector>
#include <iostream>
#include <algorithm>
#define int32_t int
#define int64_t long long
const int32_t MAX_N = 1000;
struct Vertex {
int32_t label;
std::vector< int32_t > v;
};
Vertex g[MAX_N + 5];
void dfs(int32_t u, int32_t &t, int32_t par, int32_t dep) {
if(dep % 2 == 0) {
g[u].label = t++;
}
for(auto &v : g[u].v) {
if(v != par) {
dfs(v, t, u, dep + 1);
}
}
if(dep % 2 != 0) {
g[u].label = t++;
# | 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... |