#include "stations.h"
#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define INF 10000000
#define MOD 1000000007
#define MID ((l+r)/2)
#define HASHMOD 2305843009213693951
#define ll long long
#define ull unsigned long long
#define F first
#define S second
typedef pair<ll, ll> ii;
typedef pair<ii, int> iii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef map<int, int> mii;
#define EPS 1e-6
#define FOR(i,n) for(int i=0;i<((int)(n));i++)
#define FORi(i,a,b) for(int i=((int)(a));i<((int)(b));i++)
#define FOA(v, a) for(auto v : a)
vi label(int n, int k, std::vector<int> u, std::vector<int> v) {
vi labels(n);
FOR(i,n) labels[i] = i;
return labels;
}
int find_next_station(int s, int t, std::vector<int> c) {
cout<<s<<" "<<t<<endl;
int a=s, b=t;
while(a!=b){
while(a>b) a/=2;
while(b>a) b/=2;
}
if(a<s) return *min_element(c.begin(), c.end());
int prev=-1;
while(t){
prev = t;
t/=2;
if(s==t) break;
}
return 2*s+(prev%2);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
39 ms |
616 KB |
Time limit exceeded (wall clock) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
34 ms |
624 KB |
Time limit exceeded (wall clock) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
40 ms |
632 KB |
Time limit exceeded (wall clock) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
44 ms |
528 KB |
Time limit exceeded (wall clock) |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
37 ms |
528 KB |
Time limit exceeded (wall clock) |
2 |
Halted |
0 ms |
0 KB |
- |