Submission #979933

# Submission time Handle Problem Language Result Execution time Memory
979933 2024-05-11T16:29:08 Z vjudge1 Longest Trip (IOI23_longesttrip) C++17
5 / 100
6 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;
			}
		}
	}
	return path;
}
# 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 Correct 5 ms 344 KB Output is correct
2 Correct 5 ms 344 KB Output is correct
3 Correct 4 ms 344 KB Output is correct
4 Correct 4 ms 344 KB Output is correct
5 Correct 4 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 344 KB Output is correct
2 Correct 4 ms 344 KB Output is correct
3 Correct 4 ms 344 KB Output is correct
4 Correct 6 ms 344 KB Output is correct
5 Correct 5 ms 344 KB Output is correct
6 Incorrect 0 ms 344 KB Incorrect
7 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 0 ms 344 KB Incorrect
2 Halted 0 ms 0 KB -