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 cnt1 = 0, cnt2 = 0;
int A = -1, B = -1, C = -1;
for (int i = 0; i < M; i++)
{
if (U[i])
{
C = i;
cnt2++;
}
else
{
if (A == -1)
A = i;
else
B = i;
cnt1++;
}
}
if (cnt1 <= 1 || cnt2 == 0)
return false;
return vector<int>({A, C, B, A, C, B});
}
# | 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... |