Marriage Match IV Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3147 Accepted Submission(s): 946 Problem Description Do not sincere non-interference. Like that show, now starvae also take…
题意: 给出n个点m条公路k条铁路. 接下来m行 u v w //u->v 距离w 然后k行 v w //1->v 距离w 如果修建了铁路并不影响两点的最短距离,那么修铁路是没必要的 求能删掉多少条铁路 题解: 把公路和铁路放一起构成一个图,然后跑一边最短路.最后如果最短路结果小于铁路的长度,那么这条铁路就没必要修 如果最短路结果等于铁路的长度,要先判断一下这个最短路是不是一条,如果这条最短路个数多于一条那么这条铁路就没必要修 怎么判断最短路路径数是不是大于1? 1…
hdu3594 Cactus Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1131 Accepted Submission(s): 542 Problem Description 1. It is a Strongly Connected graph. 2. Each edge of the graph belongs to…