Submission #828796

#TimeUsernameProblemLanguageResultExecution timeMemory
828796Minindu206Stations (IOI20_stations)C++14
0 / 100
3040 ms2097152 KiB
#include "stations.h" #include <bits/stdc++.h> using namespace std; vector<int> adj[1005], vals; int t = 0; void dfs(int node, int p) { for (auto a : adj[node]) { if (a != p) dfs(a, node); } vals[node] = t++; } vector<int> label(int n, int k, vector<int> u, vector<int> v) { for (int i = 0; i < n - 1; i++) { adj[u[i]].push_back(v[i]); adj[v[i]].push_back(u[i]); } vals.resize(n); dfs(0, -1); // for (int i = 0; i < n; i++) // cout << vals[i] << "\n"; // cout << '\n'; return vals; } int find_next_station(int s, int t, vector<int> c) { return c[0]; }
#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...