# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
307648 | azberjibiou | Stations (IOI20_stations) | C++17 | 1199 ms | 10688 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>
#define fir first
#define sec second
#define pii pair<int, int>
using namespace std;
const int mxN=100010;
int N;
vector <int> v[mxN], down[mxN];
int ans[mxN];
bool Chk[mxN];
int typ[mxN];
int sub[mxN];
void dfs1(int num, int typn)
{
Chk[num]=true;
typ[num]=typn;
for(int ele : v[num])
{
if(Chk[ele]) continue;
dfs1(ele, 1-typn);
sub[num]+=sub[ele];
down[num].push_back(ele);
}
}
void dfs2(int num, int str, int fin)
{
if(typ[num]==0) ans[num]=str++;
else ans[num]=fin--;
for(int ele : down[num])
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... |