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 <variant>
#include <vector>
std::variant<bool, std::vector<int>> find_journey(int N, int M, std::vector<int> U, std::vector<int> V)
{
if(N == 2)
{
std::vector<int> v = {};
int c1 = -1, c2 = -1, c3 = -1;
for(int i = 0; i < (int)U.size(); i++)
{
if(U[i] == 0 && c1 == -1)
c1 = i;
else if(U[i] == 0)
c2 = i;
else
c3 = i;
}
if(c1 == -1 || c2 == -1 || c3 == -1)
return false;
else
{
v.push_back(c1);
v.push_back(c3);
v.push_back(c2);
v.push_back(c1);
v.push_back(c3);
v.push_back(c2);
}
std::variant<bool, std::vector<int>> var;
var = v;
return var;
}
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... |