题意: 给出n个点m条公路k条铁路. 接下来m行 u v w //u->v 距离w 然后k行 v w //1->v 距离w 如果修建了铁路并不影响两点的最短距离,那么修铁路是没必要的 求能删掉多少条铁路 题解: 把公路和铁路放一起构成一个图,然后跑一边最短路.最后如果最短路结果小于铁路的长度,那么这条铁路就没必要修 如果最短路结果等于铁路的长度,要先判断一下这个最短路是不是一条,如果这条最短路个数多于一条那么这条铁路就没必要修 怎么判断最短路路径数是不是大于1? 1…
Bumped! 题目链接(点击) Peter returned from the recently held ACM ICPC World Finals only to find that his return flight was overbooked and he was bumped from the flight! Well, at least he wasn't beat up by the airline and he's received a voucher for one fre…
Problem H. Hard TestTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100342/attachments Description Andrew is having a hard time preparing his 239-th contest for Petrozavodsk. This time the solution to the problem is based on Di…
Choose the best route Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5273 Accepted Submission(s): 1680 Problem Description One day , Kiki wants to visit one of her friends. As she is liable…