# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
797618 | Joshi503 | 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.
// Source: https://usaco.guide/general/io
#include <bits/stdc++.h>
using namespace std;
union(bool, int[]) find_journey(int N, int M, int[] U, int[] V){
if(N == 2){
if(M == 1) return false;
int ida = -1, regreso = -1;
for(int i = 0; i < m; i++){
if(U[i] == 0 && V[i] == 1) ida = i;
if(U[i] == 1 && V[i] == 0) regreso = i;
}
if(ida == -1) return 0;
if(regreso != -1){
return [ida, regreso];
}
return [0, 1, 0];
}
}