# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1074286 | fv3 | Thousands Islands (IOI22_islands) | C++17 | 31 ms | 4440 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;
variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V)
{
if (N < 3)
return false;
int s_out, s_in;
for (int i = 0; i < M; i++)
{
if (U[i] == 0)
{
s_out = i;
for (int j = 0; j < M; j++)
{
if (U[j] != V[i] || V[j] != 0) continue;
s_in = j;
break;
}
break;
}
}
int e_out, e_in;
for (int i = s_out + 1; i < M; i++)
{
if (U[i] == 0)
{
e_out = i;
for (int j = 0; j < M; j++)
{
if (U[j] != V[i] || V[j] != 0) continue;
e_in = j;
break;
}
break;
}
}
return vector<int>({s_out, s_in, e_out, e_in, s_in, s_out, e_in, e_out});
}
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... |