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>
#include <variant>
#include <vector>
using namespace std;
int n, m;
vector<int> u, v;
std::variant<bool, std::vector<int>> find_journey(int N, int M, std::vector<int> U, std::vector<int> V) {
n = N, m = M;
u = U, v = V;
vector<int> ans;
if(n <= 2)
{
if(m <= 2)
return false;
int z = 0;
vector<int> cur(3);
for(int i=0;i<m;i++)
{
if(u[i] == 0)
{
if(z < 2)
cur[z] = i;
z++;
}
else
cur[2] = i;
}
if(z < 2)
return false;
ans.resize(3);
ans[0] = cur[0];
ans[1] = cur[2];
ans[2] = cur[1];
for(int i=0;i<3;i++)
ans.push_back(ans[i]);
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... |