The problem remained the same, but the numbers were modified.
Path in a graph is defined to be disjoint if there is no common edge and vertex that belongs to more than one path. Given a connected graph with N
The example above shows two configurations of disjoint paths in the same graph. When the limit of paths to be drawn (K
The input begins with a line containing an integer T
$(K \le N \le 60)$
-->
(K
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/631-2.png"
ALT="$ \le$">N
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/631-2.png"
ALT="$ \le$">1000)
$1 \le A, B \le N$
-->
1
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/631-2.png"
ALT="$ \le$">A, B
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/631-2.png"
ALT="$ \le$">N
$|D| \le 10000$
-->
| D|
WIDTH="18" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
SRC="/ntujudge/problemdata/631-2.png"
ALT="$ \le$">10000
For each case, print in a single line the maximum possible sum of weight of up to K
2 6 1 1 2 5 3 2 2 3 4 6 6 3 3 2 5 1 6 2 1 2 5 3 2 2 3 4 6 6 3 3 2 5 1
13 15
"D"isjoint "P"ath
Migrated from old NTUJ.
ICPC Jakarta, 2008, modified by tmt
No. | Testdata Range | Score |
---|