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 "longesttrip.h"
#include <bits/stdc++.h>
#define pb push_back
#define rep(a,b,c) for(int a=b; a<c; a++)
using namespace std;
vector<int> longest_trip(int N, int D){
vector<int> path;
if(D==1) return path;
bool vis[N]{};
int act=0;
rep(i,0,N){
vis[act]=true;
path.pb(act);
rep(j,0,N){
if(!vis[j] && are_connected({act},{j})){
act=j;
break;
}
}
}
return path;
}
# | 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... |