# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
797635 | 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;
struct datos{
bool ok;
vector<int> v;
};
struct datos find_journey(int N, int M, vector<int> U, vector<int> V){
if(N == 2){
datos res;
res.ok = 0;
if(M == 1) return res;
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 res;
vector<int> x;
res.ok = 1;
if(regreso != -1){
x = {ida, regreso};
res.v = x;
return res;
}
x = {0, 1, 0};
res.v = x;
return res;
}
}