# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
826615 | Marco_Escandon | Stations (IOI20_stations) | C++17 | 3 ms | 576 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <vector>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll vis=0;
vector<int> sol;
vector<ll> cad[1001];
void dfs(ll node,ll p, ll p2)
{
if(p2%2==0)
{
sol[node]=vis;
vis++;
}
for(auto i:cad[node])
{
if(i!=p)
{
dfs(i,node,p2+1);
}
}
if(p2%2==1)
{
sol[node]=vis;
vis++;
}
}
std::vector<int> label(int n, int k, std::vector<int> u, std::vector<int> v) {
for(int i=0; i<u.size(); i++)
{
cad[u[i]].push_back(v[i]);
cad[v[i]].push_back(u[i]);
}
sol.resize(n);
//dfs(0,-1,0);
return sol;
}
int find_next_station(int s, int t, std::vector<int> c) {
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |