# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
306854 | nicolaalexandra | Stations (IOI20_stations) | C++14 | 915 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 DIM 1010
using namespace std;
vector <int> L[DIM],aux;
int viz[DIM],level[DIM],fth[DIM];
pair <int,int> poz[DIM];
int idx;
void dfs (int nod){
viz[nod] = 1;
poz[nod].first = ++idx;
for (auto vecin : L[nod])
if (!viz[vecin]){
fth[vecin] = nod;
level[vecin] = 1 + level[nod];
dfs (vecin);
}
poz[nod].second = ++idx;
}
int cautare_binara (int n, int val){
int st = 0, dr = n-1;
while (st <= dr){
int mid = (st + dr)>>1;
if (aux[mid] == val)
return mid;
if (aux[mid] < val)
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... |