#include "islands.h"
#include<bits/stdc++.h>
#include <variant>
#include <vector>
using namespace std;
const int N = 100010;
vector <pair <int, int>> g[N];
std::variant<bool, std::vector<int>> find_journey(int N, int M, std::vector<int> U, std::vector<int> V) {
if(N == 2) return false;
int a[2], b[2], c[2];
for(int i = 0;i < M;i++){
if(U[i] == 0 and V[i] == 1) a[0] = i;
if(U[i] == 1 and V[i] == 0) a[1] = i;
if(U[i] == 0 and V[i] == 2) b[0] = i;
if(U[i] == 2 and V[i] == 0) b[1] = i;
if(U[i] == 1 and V[i] == 2) c[0] = i;
if(U[i] == 2 and V[i] == 1) c[1] = i;
g[U[i]].push_back({V[i], i});
}
vector <int> ans = {a[0], b[0], c[0], c[1], b[1], a[1], c[0], b[0], a[0], a[1], b[1], c[1]};
return ans;
}
# | 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... |