# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
825716 | top34051 | Thousands Islands (IOI22_islands) | C++17 | 24 ms | 4412 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>
std::variant<bool, std::vector<int>> find_journey(int N, int M,
std::vector<int> U,
std::vector<int> V) {
// Subtask 1
if (N == 2) {
std::vector<int> way, yaw;
for (int i = 0; i < M; ++i) {
int u = U[i], v = V[i];
if (u == 0) {
way.push_back(i);
} else {
yaw.push_back(i);
}
}
if ((int)way.size() >= 2 && (int)yaw.size() >= 1) {
return std::vector({way[0], yaw[0], way[1], way[0], yaw[0], way[1]});
}
}
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... |