# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
432871 | Ruba_K | Stations (IOI20_stations) | C++14 | 917 ms | 492 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 <vector>
#include<bits/stdc++.h>
using namespace std ;
const int N = 1e3 + 3 ;
vector<int> labels;
int getlog(int i){
return log2(i + 1);
}
vector<int> label(int n, int k, vector<int> u, vector<int> v) {
vector<int> labels (n);
for(int i = 0 ; i < n ; i ++)
labels[i] = i ;
return labels;
}
int find_next_station(int s, int t,vector<int> c) {
int a = getlog(s) , b = getlog(t);
int last = t ;
if(a < b){
while(a < b){
last = t ;
b -- ;
t -- ;
t /= 2 ;
}
if(t == s)
return last ;
else return (s - 1) / 2 ;
}
return (s - 1) / 2;
return c[0];
}
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... |