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 <map>
using namespace std;
variant<bool, vector<int>> find_journey(
int N, int M, vector<int> U, vector<int> V) {
map<pair<int,int>, int> m;
for (int i = 0; i < M; i++)
m[{U[i], V[i]}] = i;
if (N < 3)
return false;
int c0 = m[{0,1}];
int c1 = m[{1,0}];
int c2 = m[{1,2}];
int c3 = m[{2,1}];
int c4 = m[{2,0}];
int c5 = m[{0,2}];
return vector<int>{
c0, c2, c4, c5, c3, c1, c4, c2, c0, c1, c3, c5
};
}
# | 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... |