# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
963453 | Namkhing | Thousands Islands (IOI22_islands) | C++17 | 25 ms | 4436 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 <bits/stdc++.h>
#include "islands.h"
using namespace std;
variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V) {
int first = 0, second = 0;
for (int u : U) {
if (u) {
second++;
}
else {
first++;
}
}
if (first < 2 || second < 1) {
return false;
}
int a, b, c;
for (int i = 0; i < M; i++) {
if (!U[i]) {
a = i;
break;
}
}
for (int i = M - 1; i >= 0; i--) {
if (!U[i]) {
b = i;
break;
}
}
for (int i = 0; i < M; i++) {
if (U[i]) {
c = i;
break;
}
}
vector<int> r = {a, c, b, a, c, b};
return r;
}
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... |