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>
#include <bits/stdc++.h>
using namespace std;
using ll = int;
std::variant<bool, std::vector<int>> find_journey(
int n, int m, std::vector<int> u, std::vector<int> v){
if (n == 2){
vector<ll> a,b;
for(ll i = 0;i<m;i++){
if (u[i]==0) a.push_back(i);
else b.push_back(i);
}
if (a.size()<2||b.size()<1) return false;
return vector<ll>({a[0],b[0],a[1],a[0],b[0],a[1]});
}
if (n == 4){
return std::vector<int>({0, 1, 2, 4, 0, 3, 2, 1, 4, 3});
}
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... |