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;
variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V) {
int a = -1, b = -1, c = -1, d = -1;
for(int i = 0; i < M; i++) {
if(max(U[i], V[i])<3) {
if(U[i]==1)
b = i;
else if(U[i]==2)
d = i;
else if(V[i]==1)
a = i;
else
c = i;
}
}
if(d<0) return false;
return vector<int> {a,b,c,d,b,a,d,c};
}
# | 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... |