# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
926167 | n1k | Longest Trip (IOI23_longesttrip) | C++17 | 10 ms | 608 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 <bits/stdc++.h>
using namespace std;
/*
D=3 N
all nodes have indegree N-1
D=2
OBSERVE:
Graph is connected
if 2 nodes are not connected all other nodes are connected to them
degree in N-1 or N-2
man kann immer zwischen 2er paaren huepfen
D=1
OBSERVE
if 2 nodes are not connected all other nodes are connected to either node
find longest path ?
consider a connected component what can we say about it
can we always find a path of length == SZ(component)
connected component
add a node
if there are 2 nodes not conneced then new node also has to be connected there
# | 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... |