题意:
Because of a technical difficulty, price of an edge will be (sum of weights of all descendant nodes) × (unit price of the edge).这句话一直没看懂。后面还以为是最小生成树。
正确题意是:给一个无向图,计算每个点到1节点的最短路径(dis[i]) * 每个节点的weights之和。
注意:边权值等要用__int64;无向图;
#include
#include
#include
#include
#include