# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
996683 | stdfloat | Thousands Islands (IOI22_islands) | C++17 | 25 ms | 7628 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>
#include "islands.h"
using namespace std;
vector<vector<pair<int, int>>> E;
bool tr = false;
vector<bool> vis;
void dfs(int x, int p = -1) {
vis[x] = true;
for (auto [i, k] : E[x]) {
if (i == p) continue;
if (vis[i]) {
if (!i) tr = true;
}
else dfs(i, x);
}
}
variant<bool, vector<int>> find_journey(int n, int M, vector<int> U, vector<int> V) {
E.assign(n, {});
for (int i = 0; i < M; i++) {
E[U[i]].push_back({V[i], i});
E[V[i]].push_back({U[i], i});
}
vis.assign(n, false);
# | 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... |