摘要: 题意:求最小公路长度 分析:本题的实质是最小生成树,可以用prim算法和kruskal算法,我用的是前者 心得:第一次做,知识点还不是很理解,但是大致会用了,还要进一步学习,将它弄懂 Description 某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全 阅读全文
posted @ 2016-07-25 19:18 踮起脚望天 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=1251 题意:就是给你n个点,告诉你他们的连通情况,让你找一条最短路径使维修道路花费的钱最少,最小生成树问题,可以用prim解法和 kruskal解法,暂时还只会prim解法。 思路:以某一顶点出发,找权值最小的、相邻的边,找到后,并入 阅读全文
posted @ 2016-07-25 19:07 踮起脚望天 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1789 题意:就是你每次完成一门功课都要花一天的时间,问你怎样安排完成作业的顺序能让你被扣的分数最少。竟然是贪心。。。。。。。。。 分析:开始的思路是先按照所扣分数的多少排序,然后就没有下文了。。。。。。 阅读全文
posted @ 2016-07-24 19:22 踮起脚望天 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Description During Frosh Week, students play various fun games to get to know each other and compete against other teams. In one such game, all the fr 阅读全文
posted @ 2016-07-22 19:40 踮起脚望天 阅读(399) 评论(0) 推荐(0) 编辑
摘要: Description Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, 阅读全文
posted @ 2016-07-22 19:33 踮起脚望天 阅读(190) 评论(0) 推荐(0) 编辑
摘要: Description FJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median' cow gives: half of the cows give as mu 阅读全文
posted @ 2016-07-22 19:23 踮起脚望天 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Description There is a cycle with its center on the origin. Now give you a point on the cycle, you are to find out the other two points on it, to maxi 阅读全文
posted @ 2016-07-22 19:17 踮起脚望天 阅读(115) 评论(0) 推荐(0) 编辑
摘要: Description 严重急性呼吸系统综合症( SARS), 一种原因不明的非典型性肺炎,从2003年3月中旬开始被认为是全球威胁。为了减少传播给别人的机会, 最好的策略是隔离可能的患者。 在Not-Spreading-Your-Sickness大学( NSYSU), 有许多学生团体。同一组的学生 阅读全文
posted @ 2016-07-22 19:06 踮起脚望天 阅读(242) 评论(0) 推荐(0) 编辑
摘要: Description 给出了一个序列,你需要处理如下两种询问。 "C a b c"表示给[a, b]区间中的值全部增加c (-10000 ≤ c ≤ 10000)。 "Q a b" 询问[a, b]区间中所有值的和。 Description 给出了一个序列,你需要处理如下两种询问。 "C a b  阅读全文
posted @ 2016-07-22 19:00 踮起脚望天 阅读(212) 评论(0) 推荐(0) 编辑
摘要: Description 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Description 很多学校流行一种比较的习惯 阅读全文
posted @ 2016-07-22 18:56 踮起脚望天 阅读(142) 评论(0) 推荐(0) 编辑