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,u2=-1,v1=-1;
for (int i=0;i<m;i++) {
if (u1==-1 and u[i] == 0) {
u1 = i;
} else if (u2==-1 and u[i] == 0) {
u2 = i;
} else if (u[i] == 1) {
v1 = i;
}
}
if (u1 != -1 and u2 != -1 and v1 != -1) {
vector<int> ans = {u1,v1,u2,u1,v1,u2};
return ans;
} else {
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... |