제출 #768036

#제출 시각아이디문제언어결과실행 시간메모리
768036Nicolaikrob기지국 (IOI20_stations)C++17
0 / 100
3 ms576 KiB
#include <bits/stdc++.h> using namespace std; vector<vector<int>> G; vector<bool> V; vector<int> L; int dfs(int v, int d) { V[v] = 0; L[v] = d; for(auto x : G[v]) if(V[x]) return dfs(x, d+1); return v; } vector<int> label(int n, int k, vector<int> u, vector<int> v) { G.resize(n); V.resize(n, 1); L.resize(n); for(int i = 0; i < n-1; i++) { G[u[i]].push_back(v[i]); G[v[i]].push_back(u[i]); } dfs(dfs(0, 0), 0); return L; } int find_next_station(int s, int t, vector<int> c) { if(t > s) return max(c[0], c[1]); else return min(c[0], c[1]); } /* int main() { int n; cin >> n; } */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...