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)
{
if(N == 2) return false;
vector<int> c1, c2;
int idx[6] = {-1, -1, -1, -1, -1, -1};
for(int i = 0; i < M; i++)
{
if(U[i] == 0 && V[i] == 1)
{
idx[0] = i;
}
if(V[i] == 0 && U[i] == 1)
{
idx[1] = i;
}
if(U[i] == 1 && V[i] == 2)
{
idx[2] = i;
}
if(V[i] == 1 && U[i] == 2)
{
idx[3] = i;
}
if(U[i] == 2 && V[i] == 0)
{
idx[4] = i;
}
if(V[i] == 2 && U[i] == 0)
{
idx[5] = i;
}
}
return vector<int>({idx[0], idx[2], idx[4], idx[5], idx[2], idx[0], idx[4], idx[5]});
// if true
return vector<int>({0, 1, 2});
// if false
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... |