# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1037609 | thinknoexit | Thousands Islands (IOI22_islands) | C++17 | 0 ms | 0 KiB |
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>
using namespace std;
using ll = long long;
vector<int> boat[2];
variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V) {
for (int i = 0;i < M;i++) boat[U[i]].push_back(i);
if ((int)boat[0].size() < 2 || (int)boat[1].size() < 1) return false;
return { boat[0][0], boat[1][0], boat[0][1], boat[0][0], boat[1][0], boat[0][1] };
}