1. 程式人生 > >【CodeForces】D. Roads in Yusland

【CodeForces】D. Roads in Yusland

pos con href 算法 線段 可並堆 ads ont ble

【題目】D. Roads in Yusland

【題意】給定n個點的樹,m條嚴格從下往上的路徑,每條路徑代價ci,求最少代價使得路徑覆蓋所有邊。n,m<=3*10^5,ci<=10^9。

【算法】樹形DP+線段樹||可並堆

【題解】

【CodeForces】D. Roads in Yusland