#include "stations.h"
#include <bits/stdc++.h>
using namespace std;
int ok;
void dfs( int v, int t ) {
if ( v >= 10 ) {
return;
}
if ( v == t ) {
ok = 1;
return;
}
dfs( v * 2 + 1, t );
dfs( v * 2 + 2, t );
}
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) {
ok = 0;
int pr = -1;
for ( auto v: c ) {
if ( v < s ) {
pr = v;
continue;
}
ok = 0;
dfs( v, t );
if ( ok ) {
return v;
}
}
return pr;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
588 ms |
400 KB |
Wrong query response. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
657 ms |
400 KB |
Wrong query response. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
565 ms |
476 KB |
Wrong query response. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
926 ms |
400 KB |
Output is correct |
2 |
Incorrect |
694 ms |
400 KB |
Wrong query response. |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
603 ms |
528 KB |
Wrong query response. |
2 |
Halted |
0 ms |
0 KB |
- |