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>
using namespace std;
#define lli long long int
#define debug(a) cout << #a << " = " << a << endl
#define debugsl(a) cout << #a << " = " << a << ", "
#define rep(i,a,b) for(int i = (a); i <= (b); i++)
#define repa(i,a,b) for(int i = (a); i >= (b); i--)
#define pll pair<lli,lli>
vector<int> camino;
lli a,b,c,d,n;
std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) {
n = N;
if (n == 2) return false;
rep(i,0,M-1) {
if (U[i] == 0 && V[i] == 1) a = i;
if (U[i] == 1 && V[i] == 0) b = i;
if (U[i] == 0 && V[i] == 2) c = i;
if (U[i] == 2 && V[i] == 0) d = i;
}
camino.push_back(a);
camino.push_back(b);
camino.push_back(c);
camino.push_back(d);
camino.push_back(b);
camino.push_back(a);
camino.push_back(d);
camino.push_back(c);
return camino;
}
# | 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... |