# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
706645 | danikoynov | Thousands Islands (IOI22_islands) | C++17 | 167 ms | 29964 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 "islands.h"
#include <variant>
#include <vector>
#include <queue>
#include <iostream>
using namespace std;
const int maxn = 1e5 + 10;
int seen[maxn], in_deg[maxn], out_deg[maxn];
int n, m;
vector < int > links[maxn], rev_links[maxn];
vector < pair < int, int > > graph[maxn];
vector < int > path[3], cycle[3];
int dfs(int node, int id, int root)
{
if (seen[node] != 0)
return node;
///cout << node << " : " << id << " : " << root << endl;
seen[node] = 1;
for (pair < int, int > dest : graph[node])
{
if (seen[dest.first] >= 0)
{
path[id].push_back(dest.second);
int up = dfs(dest.first, id, root);
if (id == 0)
{
if (up >= 0)
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... |