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 <bits/stdc++.h>
using namespace std;
variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V){
int cont0 = 0, cont1 = 0;
int b1 = -1, b2 = -1, b3 = -1;
for (int i = 0; i < M; i++){
if(U[i] == 0){
cont0++;
if(b1==-1) b1 = i;
else b2 = i;
}
else {
cont1++;
b3 = i;
}
}
if(cont0 > 1 and cont1 > 0){
vector<int> ans = {b1, b3, b2, b1, b3, b2};
return ans;
}
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... |