#include "stations.h"
#include <bits/stdc++.h>
#define PB push_back
#define sz(x) ((int)x.size())
using namespace std;
vector<int> g[1000];
int tin[1000], tout[1000], tt = 0;
void dfs(int v, int p){
tin[v] = tt++;
for (int u : g[v]){
if (u == p) continue;
dfs(u, v);
}
tout[v] = tt - 1;
}
std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) {
vector<int> labels;
labels.resize(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) {
int cur = t;
while (cur > 0){
for (int v : c)
if (v == cur)
return v;
cur = (cur - 1) / 2;
}
return (s - 1) / 2;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
537 ms |
768 KB |
Wrong query response. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
448 ms |
768 KB |
Output is correct |
2 |
Correct |
519 ms |
1052 KB |
Output is correct |
3 |
Correct |
848 ms |
1032 KB |
Output is correct |
4 |
Correct |
647 ms |
880 KB |
Output is correct |
5 |
Correct |
578 ms |
1036 KB |
Output is correct |
6 |
Correct |
448 ms |
1024 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
513 ms |
768 KB |
Wrong query response. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
871 ms |
876 KB |
Output is correct |
2 |
Incorrect |
668 ms |
880 KB |
Wrong query response. |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
518 ms |
768 KB |
Wrong query response. |
2 |
Halted |
0 ms |
0 KB |
- |