# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1058271 | nvujica | 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 "islands.h"
#include <variant>
#include <vector>
using namespace std;
const int maxn = 1e5 + 10;
pair<int, int> adj[maxn];
map<pair<int, int> , int> mp;
variant<bool, std::vector<int>> find_journey(int n, int m, vector<int> u, vector<int> v)(
for(int i = 0; i < m; i++){
mp[{u[i], v[i]}] = i;
}
if(n == 2) return 0;
return {mp[{0, 1}], mp[{1, 0}], mp[{0, 2}], mp[{2, 0}], mp[{0, 1}], mp[{1, 0}], mp[{0, 2}], mp[{2, 0}]};
}