随笔分类 -  最短路

摘要:Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home too quickly 阅读全文
posted @ 2019-08-11 23:40 black_hole6 阅读(374) 评论(0) 推荐(0) 编辑
摘要:在郊区有 N 座通信基站,P 条双向电缆,第 i 条电缆连接基站AiAi和BiBi。 特别地,1 号基站是通信公司的总站,N 号基站位于一座农场中。 现在,农场主希望对通信线路进行升级,其中升级第 i 条电缆需要花费LiLi。 电话公司正在举行优惠活动。 农产主可以指定一条从 1 号基站到 N 号基 阅读全文
posted @ 2019-08-08 11:02 black_hole6 阅读(317) 评论(0) 推荐(1) 编辑
摘要:Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old home too quickly 阅读全文
posted @ 2019-08-03 22:42 black_hole6 阅读(171) 评论(0) 推荐(1) 编辑
摘要:Recently, Shua Shua had a big quarrel with his GF. He is so upset that he decides to take a trip to some other city to avoid meeting her. He will trav 阅读全文
posted @ 2019-08-03 21:53 black_hole6 阅读(206) 评论(0) 推荐(0) 编辑
摘要:Tom is playing a game called Idiomatic Phrases Game. An idiom consists of several Chinese characters and has a certain meaning. This game will give To 阅读全文
posted @ 2019-07-31 10:35 black_hole6 阅读(286) 评论(0) 推荐(0) 编辑
摘要:最短路(vector+Dijkstra优先队列优化) #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<queue> #include<stack> #include<set> #in 阅读全文
posted @ 2019-07-29 22:10 black_hole6 阅读(195) 评论(0) 推荐(0) 编辑
摘要:A friend of yours, an inventor, has built a spaceship recently and wants to explore space with it. During his first voyages, he discovered that the un 阅读全文
posted @ 2019-07-29 21:28 black_hole6 阅读(203) 评论(0) 推荐(0) 编辑
摘要:Jimmy experiences a lot of stress at work these days, especially since his accident made working difficult. To relax after a hard day, he likes to wal 阅读全文
posted @ 2019-05-30 09:40 black_hole6 阅读(259) 评论(0) 推荐(0) 编辑
摘要:年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他... 阅读全文
posted @ 2019-04-26 09:40 black_hole6 阅读(177) 评论(0) 推荐(0) 编辑
摘要:Edward, the emperor of the Marjar Empire, wants to build some bidirectional highways so that he can reach other cities from the capita... 阅读全文
posted @ 2019-04-12 16:52 black_hole6 阅读(207) 评论(0) 推荐(0) 编辑
摘要:题目描述梦工厂有 n 个分厂(从 1 开始编号),有m对分厂通过双向铁路相连。为了保证每两个分厂之间的同学可以方便地进行交流,掌舵人张老师就在那些没有铁路连接的分厂之间建造了公路。在两个直接通过公路或铁路相连的分厂之间移动,需要花费 1 小时。现在菜鸡wxy和hbz都... 阅读全文
posted @ 2019-02-07 17:14 black_hole6 阅读(450) 评论(0) 推荐(0) 编辑
摘要:有了一张自驾旅游路线图,你会知道城市间的高速公路长度、以及该公路要收取的过路费。现在需要你写一个程序,帮助前来咨询的游客找一条出发地和目的地之间的最短路径。如果有若干条路径都是最短的,那么需要输出最便宜的一条路径。输入格式:输入说明:输入数据的第1行给出4个正整数N、... 阅读全文
posted @ 2018-12-20 16:45 black_hole6 阅读(334) 评论(0) 推荐(0) 编辑

欢迎阅读『最短路』
点击右上角即可分享
微信分享提示