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;
typedef long long ll;
typedef pair<int,int> pii;
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define pb push_back
#define mk make_pair
#define fr first
#define sc second
vector<vector<pii>> edges;
variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V) {
edges.resize(N);
for(int i = 0; i < M; i++) edges[U[i]].pb({V[i], i});
if(sz(edges[0]) < 2 or sz(edges[1]) < 1) return false;
vector<int> ans;
ans.pb(edges[0][0].sc); // 0 pra 1
ans.pb(edges[1][0].sc); // 1 pra 0
ans.pb(edges[0][1].sc); // 0 pra 1
ans.pb(edges[0][0].sc); // 1 pra 0
ans.pb(edges[1][0].sc); // 0 pra 1
ans.pb(edges[0][1].sc); // 1 pra 0
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... |