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;
#define MAXI (int)1e3+10
vector<int> ad[MAXI];
vector<int> labels;
vector<int> label(int n, int k, vector<int> u, vector<int> v) {
labels.assign(n,0);
for(int i = 0;i<MAXI;i++) ad[i].clear();
for(int i = 0;i<n-1;i++){
ad[u[i]].push_back(v[i]);
ad[v[i]].push_back(u[i]);
}
for(int i = 0;i<n;i++) labels[i] = i+1;
return labels;
}
int find_next_station(int s, int t, std::vector<int> c) {
if(s > t) return c[0];
else{
while(t > s){
if(t == c[1]) return c[1];
if(t == c[2]) return c[2];
t >>= 1;
}
}
return c[0];
}
# | 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... |