# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
736359 | puppy | Thousands Islands (IOI22_islands) | C++17 | 44 ms | 4084 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) {
int a01, a10, a02, a20;
if (N == 2) return false;
else {
for (int i = 0; i < M; i++) {
if (U[i] == 0) {
if (V[i] == 1) a01 = i;
else if (V[i] == 2) a02 = i;
}
else if (V[i] == 0 && U[i] == 1) a10 = i;
else if (V[i] == 0 && U[i] == 2) a20 = i;
}
return vector<int>({a01, a10, a02, a20, a10, a01, a20, a02});
}
}
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... |