# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
415634 | MKopchev | Stations (IOI20_stations) | C++14 | 1238 ms | 900 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 "stations.h"
#include<bits/stdc++.h>
using namespace std;
const int nmax=1e3+42;
vector<int> adj[nmax];
int in[nmax],out[nmax],when;
vector<int> outp;
void dfs(int node,int par,int depth)
{
when++;
in[node]=when;
for(auto w:adj[node])
if(w!=par)dfs(w,node,depth+1);
when++;
out[node]=when;
//cout<<node<<" "<<depth<<" -> "<<in[node]<<" "<<out[node]<<endl;
if(depth%2==0)outp[node]=in[node];
else outp[node]=out[node];
}
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... |