#include "stations.h"
#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define vll vector<ll>
#define pll pair<ll, ll>
#define pb push_back
typedef int ll;
vector<int> label(int n, int k, vector<int> u, vector<int> v) {
vll re(n);
for(ll i=0;i<n;i++){
re[i]=i+1;
}
return re;
}
int find_next_station(int s, int t, vector<int> c) {
vll con;
while(t>0){
con.pb(t);
t/=2;
}
ll p=s/2;
for(auto &it:c){
if(it==p) continue;
auto it2=lower_bound(con.begin(), con.end(), it);
if(it2!=con.end() && (*it2)==it){
return it;
}
}
return p;
}
# | 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... |