请教:做一个full bathroom大概得花多少钱?# Living
C*U
1 楼
Given an undirected tree T = (V;E) with weights on edges: find the maximum
weight set M of edges such that no two edges in M share a vertex.
应该可以用dynamic programming吧
但是还是觉得时间花费很大
greedy不可行,我可以举出反例
有什么好的办法么?
weight set M of edges such that no two edges in M share a vertex.
应该可以用dynamic programming吧
但是还是觉得时间花费很大
greedy不可行,我可以举出反例
有什么好的办法么?