
图论
codertcm
这个作者很懒,什么都没留下…
展开
-
Agri-Net 最短网络
农民约翰被选为他们镇的镇长!他其中一个竞选承诺就是在镇上建立起互联网,并连接到所有的农场。当然,他需要你的帮助。 约翰已经给他的农场安排了一条高速的网络线路,他想把这条线路共享给其他农场。为了用最小的消费,他想铺设最短的光纤去连接所有的农场。 你将得到一份各农场之间连接费用的列表,你必须找出能连接所有农场并所用光纤最短的方案。 Input 第一行: 农场的个数,N(3<=N<=10...原创 2018-09-13 22:50:59 · 237 阅读 · 0 评论 -
Bakery
Masha wants to open her own bakery and bake muffins in one of the n cities numbered from 1 to n. There are m bidirectional roads, each of whose connects some pair of cities. To bake muffins in her bak...原创 2018-09-22 15:36:03 · 612 阅读 · 0 评论