# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
994265 | vjudge1 | Jail (JOI22_jail) | C++17 | 57 ms | 18776 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;
vector<vector<int> > g, g2;
vector<int> vis;
bool dfs(int v, int go)
{
vis[v] = 1;
if(v == go)
{//cout << v << endl;
return 1;
}
for(auto x : g[v])
{
if(vis[x] == 0 && dfs(x, go)) return 1;
}
vis[v] = 2;
return 0;
}
bool c(int v)
{
vis[v] = 1;
for(auto x : g2[v])
{
//cout << v << " " << x << endl;
if(vis[x] == 1) return 1;
if(vis[x] == 0) if(c(x)) return 1;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |