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<bits/stdc++.h>
using namespace std;
#include <vector>
typedef int ll;
#include <variant>
#include <vector>
std::variant<bool, std::vector<int>> find_journey(int n, int m, std::vector<int> U, std::vector<int> V)
{
vector<pair<ll,pair<ll,ll>>> v;
for(int i=0; i<m; i++)
{
v.push_back({U[i],{V[i],i}});
}
sort(v.begin(),v.end());
if(m<=2||v[0].first==1||v[1].first==1||v[m-1].first==0)
{
return false;
}
vector<int>asd(6);
asd[0]=v[0].second.second;
asd[1]=v[m-1].second.second;
asd[2]=v[1].second.second;
asd[3]=v[0].second.second;
asd[4]=v[m-1].second.second;
asd[5]=v[1].second.second;
return asd;
}
# | 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... |