最短路
晚乔最美
这个作者很懒,什么都没留下…
展开
-
程序设计:最短路(2020蓝桥杯省赛B组模拟题)
给定一个 n 点 m 边的有向带权图表示一座城市,起点为 1 。送餐小哥需要给 n 个客户送外卖,第 i 个客户的家在第 i 号点。由于他的车子容量很小,所以一次只能容纳一份外卖,所以送达外卖之后就要回到起点取新的外卖送下一单,直到全部送到位置。有向图保证联通。外卖小哥一定走的最短路。求送餐小哥走的总路程。输入格式第一行一个整数 T,表示数据组数。对于每组数据,第一行两个整数 n 和 m 。接下来 mm 行,每行三个整数 ui,vi,ci表示每条有向边。输出格式对于每组数据,输出一行一个整原创 2020-08-10 23:49:35 · 452 阅读 · 0 评论 -
Mario Kart (背包+最短路)
Have you ever played the Mario game? Of course you did, who did not?! Anyway, a new version of the Mario game has been released, it is some kind of kart racing game. And you decided to write a program to find the best strategy for you to complete each level原创 2020-07-23 23:30:25 · 530 阅读 · 0 评论 -
牛客小白月赛10 D 饥饿(最短路)
题目传送门题目描述夕阳西下,匆匆忙忙间,SSJ一天的课程已经全部上完了,肚子咕咕开始叫了,坐上回家的公交车,可是SSJ今天好像有点迷,据说今中午吃饭时没去食堂,走着走着,外边景色好美啊,啊?我好像没走过这,完了,我好想迷路了。公交车到了终点站,SSJ下车了,内心无比紧张,回不去了,一阵冷风吹过,瑟瑟发抖,emm…,那是一张地图?地图上有啥大家都明白,SSJ现在已经饿得无力思考了,请你帮他设...原创 2020-02-15 12:50:10 · 149 阅读 · 0 评论 -
Heat Wave
The good folks in Texas are having a heatwave this summer. Their Texas Longhorn cows make for good eating but are not so adept at creating creamy delicious dairy products. Farmer John is leading the c...原创 2019-09-01 17:06:02 · 204 阅读 · 0 评论 -
Job Hunt
Bessie is running out of money and is searching for jobs. Farmer John knows this and wants the cows to travel around so he has imposed a rule that his cows can only make D (1 <= D <= 1,000) doll...原创 2019-09-02 21:35:54 · 378 阅读 · 0 评论