# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
319790 | northlake | Stations (IOI20_stations) | C++17 | 986 ms | 864 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<bits/stdc++.h>
using namespace std;
vector<int> label(int n, int k, vector<int> u, vector<int> v) {
vector<int> labels = {};
for (int i = 0; i < n; i++) {
labels.push_back(i);
}
return labels;
}
bool is_child(int a, int b) {
if (a == b) return true;
if (a > b) return false;
return (is_child(2*a + 1, b) || is_child(2*a + 2, b));
}
int find_next_station(int s, int t, vector<int> c) {
if (!is_child(s, t)) return c[0];
if (is_child(2*s + 1, t)) return (2*s + 1);
if (is_child(2*s + 2, t)) return (2*s + 2);
}
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... |