# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
306866 | Ruxandra985 | Stations (IOI20_stations) | C++14 | 1041 ms | 1280 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 <bits/stdc++.h>
#include "stations.h"
#define DIMN 1010
using namespace std;
int poz;
int lab[DIMN] , last[DIMN] , niv[DIMN];
vector <int> ww[DIMN];
void dfs (int nod , int tt , int lvl){
int i , vecin;
//printf ("%d ", nod);
if (lvl % 2 == 0)
poz++;
lab[nod] = poz;
niv[nod] = lvl;
for (i = 0 ; i < ww[nod].size() ; i++){
vecin = ww[nod][i];
if (vecin != tt){
dfs (vecin , nod , lvl + 1);
}
}
if (lvl % 2 == 1)
poz++;
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... |