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>
#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) {
int a=0,b=-1;
pair<int,int>p;
for(int i=0;i<M;i++){
if(U[i]==0){
if(a>=2)continue;
if(a==1)p.second=i;
else p.first=i;
a++;
}
else {
b=i;
}
}
if (b!=-1 && a>=2) {
return std::vector<int>({p.first,b,p.second,p.first,b,p.second});
}
return false;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |