# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
782467 | kebine | Naboj (COCI22_naboj) | C++17 | 76 ms | 10720 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;
const ll MAXN = 2e5 + 5;
const ll MAXM = 5e5 + 5;
ll n, m;
vector<ll> adjl[MAXN], ans;
bool visited[MAXN], flag = false;
void dfs(ll now) {
if (visited[now])
{
flag = true;
return ;
}
visited[now] = true;
vector<ll> adjn = adjl[now];
for (int i = 0; i < adjn.size(); ++i)
{
ll nxt = adjn[i];
if (visited[nxt]) {
flag = true;
return ;
}
dfs(nxt);
if (flag) {
return ;
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... |