#include <bits/stdc++.h>
#include "stations.h"
using namespace std;
vector<int> label(int n, int k, vector<int> u, vector<int> v) {
vector<int> ret(n);
iota(ret.begin(), ret.end(), 0);
return ret;
}
bool is(int x, int y) {
x++; y++;
while (y > x) {
y /= 2;
}
return x == y;
}
int find_next_station(int s, int t, vector<int> c) {
if (is(s, t)) {
for (auto x : c) {
if (is(x, t) && x > s) {
return x;
}
}
}
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... |