# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
321227 | giorgikob | Stations (IOI20_stations) | C++14 | 1093 ms | 1248 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 <vector>
#include<bits/stdc++.h>
#define ll long long
#define ff first
#define ss second
#define pb push_back
using namespace std;
const int N = 1e3+5;
vector<int>gr[N];
int cnt = 0;
int fix[N];
int mn[N];
int in[N], out[N];
vector<pair<int,int>>P;
void dfs(int x, int h, vector<int>&v){
fix[x] = 1;
in[x] = cnt;cnt++;
for(auto to : gr[x]){
if(fix[to]) continue;
dfs(to,h+1,v);
}
out[x] = cnt;cnt++;
if(h%2){
//v[x] = out[x];
P.pb({out[x],x});
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... |