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;
variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V) {
vector<map<int, vector<int>>> adj(N);
for(int i = 0; i < M; ++i) {
adj[U[i]][V[i]].push_back(i);
}
if((int)adj[0][1].size() >= 2 && (int)adj[1][0].size() >= 1) {
vector<int> ans = {adj[0][1][0], adj[1][0][0], adj[0][1][1], adj[0][1][0], adj[1][0][0], adj[0][1][1]};
return ans;
}
return 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... |