# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
955801 | n1k | Thousands Islands (IOI22_islands) | C++17 | 38 ms | 9684 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;
vector<vector<array<int, 2>>> g, rg;
vector<int> color, par, del, deg;
map<int, int> cache;
int dfs(int u, int p){
par[u] = p;
del[u] = 1;
int out_deg = 0;
for(auto [v, e]:g[u]){
out_deg += 1-del[v];
}
if(out_deg>1)
return 1;
bool ok = 0;
for(auto [v, e]:g[u]){
if(del[v])
continue;
ok |= dfs(v, u);
}
# | 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... |