# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
98002 | popovicirobert | One-Way Streets (CEOI17_oneway) | C++14 | 207 ms | 22848 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>
#define lsb(x) (x & (-x))
#define ll long long
#define ull unsigned long long
#define ld long double
// 217
// 44
using namespace std;
const int MAXN = (int) 1e5;
vector < pair <int, int> > g[MAXN + 1];
int lvl[MAXN + 1], low[MAXN + 1];
int id[MAXN + 1], cnt;
stack <int> stk;
char sol[MAXN + 1];
void dfs(int nod, int par) {
lvl[nod] = lvl[par] + 1;
low[nod] = lvl[nod];
stk.push(nod);
bool ok = 0;
for(auto it : g[nod]) {
if(lvl[it.first] == 0) {
dfs(it.first, nod);
low[nod] = min(low[nod], low[it.first]);
if(low[it.first] > lvl[nod]) {
cnt++;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |