# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
830424 | caganyanmaz | Thousands Islands (IOI22_islands) | C++17 | 0 ms | 0 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;
#ifdef DEBUGGING
#include "../debug.h"
#else
#define debug(x...) void(42)
#endif
int n, m;
vector<int> u, v;
variant<bool, vector<int>> subtask1()
{
if (n <= 2)
return false;
array<array<int, 3>, 3> a;
for (int i = 0; i < m; i++)
if (u[i] <= 2 && v[i] <= 2)
a[u[i]][v[i]] = i;
debug(a);
return vector<int>({a[0][1], a[1][2], a[2][0], a[0][2], a[2][1], a[1][0], a[2][0], a[1][2], a[0][1], a[1][0], a[2][1], a[0][2]});
}
Language Result Execution time Memory
830423 2023-08-19 09:27:30 caganyanmaz
variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V)
{
n = N;
m = M;
u = U;
v = V;
if (n * (n-1) == m)
return subtask1();
assert(false);
}