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 <variant>
#include <vector>
#include <bits/stdc++.h>
using namespace std;
std::variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V) {
vector<int> v[2];
for (int i = 0; i < M; ++i) {
v[U[i]].push_back(i);
}
if (v[1].empty() || v[0].size() <= 1) return false;
int x = v[0][0], y = v[0][1], z = v[1][0];
return vector<int>({x, z, y, x, z, y});
}
# | 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... |