# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1190576 | Amr | Rarest Insects (IOI22_insects) | C++20 | 0 ms | 0 KiB |
#include "islands.h"
#include <variant>
#include <vector>
#include<bits/stdc++.h>
using namespace std;
std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) {
if(N==2)
{
int a= 0, b = 0;
for(int i = 0; i < M; i++) if(U[i]==0) a++; else b++;
if(a>=2&&b>=1) return vector<int>({0,1,0,1,0,1});
else return false;
}
return vector<int>({0,1,2,1,0,1,2,1});
}