Submission #979931

# Submission time Handle Problem Language Result Execution time Memory
979931 2024-05-11T16:24:45 Z vjudge1 Longest Trip (IOI23_longesttrip) C++17
0 / 100
1 ms 344 KB
#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
1 Incorrect 0 ms 344 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Incorrect
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Incorrect
2 Halted 0 ms 0 KB -