# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
798134 | MilosMilutinovic | Thousands Islands (IOI22_islands) | C++17 | 34 ms | 10324 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 <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
vector < pair <int, int> > g[N];
vector < pair <int, int> > G[N];
int conn[500][500], pp[N], par[N];
pair <int, int> go_up[N];
bool was[N], good;
vector <int> cyc;
void dfs_cyc(int x, int fa) {
if (!cyc.empty()) return;
was[x] = true;
int cnt = 0;
vector<int> ch;
for (auto& p : G[x]) {
int y = p.first;
int id = p.second;
if (id / 2 == fa / 2) continue;
ch.push_back(id);
if (was[y]) {
int ver = x;
while (false && ver != y) {
cyc.push_back(go_up[ver].second);
ver = go_up[ver].first;
}
//reverse(cyc.begin(), cyc.end());
cnt++;
continue;
# | 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... |