# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1028145 | 42kangaroo | Thousands Islands (IOI22_islands) | C++17 | 34 ms | 5912 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 <variant>
#include <vector>
using namespace std;
std::variant<bool, std::vector<int>> find_journey(
int N, int M, std::vector<int> U, std::vector<int> V) {
if (N == 2) {
vector<int> s0, s1;
for (int i = 0; i < M; ++i) {
if (U[i] == 0) s0.push_back(i);
else s1.push_back(i);
}
if (s0.size() >= 2 && s1.size() >= 1) {
return vector<int>{s0[0], s1[0], s0[1], s0[0], s1[0], s0[1]};
} else return false;
}
}
Compilation message (stderr)
# | 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... |