#include "stations.h"
#include <vector>
#include<bits/stdc++.h>
using namespace std;
using ll = int;
std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) {
std::vector<int> labels(n);
for (int i = 0; i < n; i++) {
labels[i] = i;
}
return labels;
}
int find_next_station(int s, int t, std::vector<int> c) {
s++;t++;
ll lgs = __lg(s), lgt = __lg(t);
if (lgs<lgt){
ll x = t>>(lgt-lgs);
if (s==x){
return (t>>(lgt-lgs-1))-1;
}
}
return (s>>1)-1;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
311 ms |
684 KB |
Wrong query response. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
224 ms |
684 KB |
Output is correct |
2 |
Correct |
315 ms |
936 KB |
Output is correct |
3 |
Correct |
482 ms |
684 KB |
Output is correct |
4 |
Correct |
362 ms |
684 KB |
Output is correct |
5 |
Correct |
347 ms |
684 KB |
Output is correct |
6 |
Correct |
273 ms |
684 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
280 ms |
684 KB |
Wrong query response. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
465 ms |
684 KB |
Output is correct |
2 |
Incorrect |
295 ms |
684 KB |
Wrong query response. |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
264 ms |
684 KB |
Wrong query response. |
2 |
Halted |
0 ms |
0 KB |
- |