# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
894700 | JeanBombeur | Longest Trip (IOI23_longesttrip) | C++17 | 765 ms | 1864 KiB |
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 <vector>
#include <cstdio>
#include <algorithm>
using namespace std;
// <|°_°|>
const int MAX_NODES = 256;
bool Edge[MAX_NODES][MAX_NODES];
vector <int> Adj[MAX_NODES];
vector <int> Path;
int Seen[MAX_NODES];
int Dfs(int node) {
if (Seen[node])
return 0;
Path.push_back(node);
int ans = Seen[node] = 1;
for (int dest : Adj[node])
ans += Dfs(dest);
return ans;
}
vector <int> longest_trip(int nbNodes, int density) {
for (int i = 0; i < nbNodes; i ++)
# | 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... |