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>ans;
for(int i=0;i<n;i++)ans.push_back(i+1);
return ans;
}
int find_next_station(int s, int t, vector<int> c) {
int copyt=t;
while(__builtin_clz(t)<__builtin_clz(s)) {
t/=2;
}
if(t!=s)return s/2;
t=copyt;
while(__builtin_clz(t)+1<__builtin_clz(s))t/=2;
if(t%2)return s*2+1;
else return s*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... |