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;
#define pb push_back
#define eb emplace_back
using ii = pair<int, int>;
variant<bool, vector<int> > find_journey(int N, int M, vector<int> U, vector<int> V) {
if (N == 2) {
return false;
}
int e1 = -1, e2 = -1, e3 = -1, e4 = -1, e5 = -1, e6 = -1;
for (int i = 0; i < M; i++) {
if (U[i] == 0 && V[i] == 1) {
e1 = i;
} else if (U[i] == 1 && V[i] == 2) {
e2 = i;
} else if (U[i] == 2 && V[i] == 0) {
e3 = i;
} else if (U[i] == 1 && V[i] == 0) {
e4 = i;
} else if (U[i] == 2 && V[i] == 1) {
e5 = i;
} else if (U[i] == 0 && V[i] == 2) {
e6 = i;
}
}
assert(min({e1, e2, e3, e4, e5, e6}) != -1);
auto ret = {e1, e2, e3, e6, e5, e4, e3, e2, e1, e4, e5, e6};
return ret;
}
# | 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... |