# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
637330 | Fidan | Thousands Islands (IOI22_islands) | C++17 | 1096 ms | 3412 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 <variant>
#include "islands.h"
using namespace std;
typedef int ll;
void dfs1(ll k, vector<vector<pair<ll, ll>>> &g, vector<bool> &used){
if(used[k]) return;
used[k]=true;
for(ll i=0; i<g[k].size(); i++){
dfs1(g[k][i].first, g, used);
}
}
vector<ll> s;
bool dfs(ll k, vector<vector<ll>> &g, vector<bool> &used){
s.push_back(k);
if(used[k]){
return true;
}
used[k]=true;
for(ll i:g[k]) {
if(dfs(i, g, used)) return true;
}
used[k]=false;
s.pop_back();
return false;
}
variant<bool, vector<int>> find_journey(int n, int m, vector<int> u, vector<int> v){
bool bo=true;
if(m%2==1) bo=false;
if(bo){
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... |