//In the name of God
#include<bits/stdc++.h>
#include "stations.h"
using namespace std;
typedef int ll;
typedef pair<ll, ll> pll;
const ll maxn = 1100;
const ll mod = 1e9 + 7;
const ll inf = 1e9;
#define Mp make_pair
#define F first
#define S second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define Sz(x) ll((x).size())
ll t, st[maxn], ft[maxn], h[maxn];
vector<ll> g[maxn];
void dfs(ll v, ll p){
st[v] = t++;
for(ll u : g[v]){
if(u != p){
h[u] = h[v] + 1;
dfs(u, v);
}
}
ft[v] = t++;
}
vector<int> label(int n, int k, vector<int> u, vector<int> v) {
vector<int> labels(n);
/*for(ll i = 0; i < n - 1; i++){
g[u[i]].pb(v[i]);
g[v[i]].pb(u[i]);
}
dfs(0, 0);
for (int i = 0; i < n; i++) {
if(h[i] & 1) labels[i] = ft[i];
else labels[i] = st[i];
}*/
return labels;
}
int find_next_station(int s, int t, vector<int> c){
return c[0];
sort(all(c));
if(s < c[0]){
ll ls = s + 1;
for(ll i = 0; i < Sz(c) - 1; i++){
if(ls <= t && t <= c[i]) return c[i];
ls = c[i] + 1;
}
return c.back();
}
ll ls = s - 1;
for(ll i = Sz(c) - 1; i > 0; i--){
if(c[i] <= t && t <= ls) return c[i];
ls = c[i] - 1;
}
return c[0];
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
3 ms |
312 KB |
Invalid labels (duplicates values). scenario=0, label=0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
5 ms |
308 KB |
Invalid labels (duplicates values). scenario=0, label=0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
3 ms |
328 KB |
Invalid labels (duplicates values). scenario=0, label=0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
200 KB |
Invalid labels (duplicates values). scenario=0, label=0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
3 ms |
316 KB |
Invalid labels (duplicates values). scenario=0, label=0 |
2 |
Halted |
0 ms |
0 KB |
- |