# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
445901 | negar_a | One-Way Streets (CEOI17_oneway) | C++14 | 234 ms | 25440 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>
using namespace std;
typedef long long ll;
typedef long double ld;
#define S second
#define F first
#define pb push_back
#define mp make_pair
#define pii pair <int, int>
#define fast_io ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const int maxn = 1e5 + 5, lg = 20;
vector <int> adj[maxn];
int cnt[maxn], ps1[maxn], ps2[maxn], h[maxn], com[maxn];
int par[maxn][lg + 5], x[maxn], y[maxn];
bool mark[maxn];
void dfs(int v, int cm){
com[v] = cm;
bool f = false;
for(int u : adj[v]){
if(!com[u]){
par[u][0] = v;
h[u] = h[v] + 1;
for(int i = 1; i < lg; i ++){
par[u][i] = par[par[u][i - 1]][i - 1];
}
dfs(u, cm);
}
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... |