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>
#include "islands.h"
using namespace std;
#define mp make_pair
#define fr first
#define sc second
const long long inf=1e18;
long long n,m;
pair<long long,long long> ed[100069];
vector<pair<long long,long long>> al[100069];
variant<bool,vector<int>> find_journey(int on,int om,vector<int> ka,vector<int> la)
{
long long i,k,l;
vector<int> sq;
n=on;
if(n==2)
{
return false;
}
m=om;
for(i=1;i<=m;i++)
{
k=ka[i-1]+1;
l=la[i-1]+1;
ed[i]={k,l};
al[k].push_back({l,i-1});
}
for(i=1;i<=n;i++)
{
sort(al[i].begin(),al[i].end());
}
sq.push_back(al[1][0].sc);
sq.push_back(al[2][1].sc);
sq.push_back(al[3][1].sc);
sq.push_back(al[1][0].sc);
sq.push_back(al[1][1].sc);
sq.push_back(al[2][1].sc);
sq.push_back(al[3][1].sc);
sq.push_back(al[1][1].sc);
return sq;
}
# | 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... |