이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
}
}
}
path.pb(act);
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... |