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 <variant>
#include <bits/stdc++.h>
using namespace std;
variant<bool,vector<int>> find_journey( int n, int m, vector<int> u, vector<int> v) {
int u1=-1,v1=-1,u2=-1,v2=-1,u3=-1,v3=-1;
if (n==2) {
return false;
}
for (int i=0;i<m;i++) {
if (u[i] == 0 and v[i] == 1) {
u1 = i;
}
if (u[i] == 1 and v[i] == 2) {
u2 = i;
}
if (u[i] == 2 and v[i] == 0) {
u3 = i;
}
if (u[i] == 1 and v[i] == 0) {
v1 = i;
}
if (u[i] == 2 and v[i] == 1) {
v2 = i;
}
if (u[i] == 0 and v[i] == 2) {
v3 = i;
}
}
vector<int> ans = {u1,u2,u3,v3,v2,v1,u3,u2,u1,v1,v2,v3};
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... |