2012年8月22日

旋转卡壳

摘要: 该算法一般用于求凸包上两点间的最大距离。方法一: 从任意一个顶点开始,按逆时针方向计算其他每一点到该顶点的距离。使距离为一直是递增的,直到开始递减;然后记录下这一次的最大值。 然后移动为基础的那个点,从上次中断的点开始;再重复上述步骤,直到距离又递减为止。 所有的最大值即是凸包的直径。方法二: 任意取一条边,计算每一个点到该条边的距离,直到距离开始递减;具体和方法一相似。代码实现(凸包的周长,直径:方法二)#include <iostream>#include <cstdio>#include <cstdlib>#include <cstring> 阅读全文

posted @ 2012-08-22 21:24 yumao 阅读(243) 评论(0) 推荐(0)

图 poj 1511

摘要: Invitation CardsTime Limit: 8000MSMemory Limit: 262144KTotal Submissions: 14626Accepted: 4727DescriptionIn the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Comedies. T 阅读全文

posted @ 2012-08-22 16:46 yumao 阅读(124) 评论(0) 推荐(0)

图 poj 1985

摘要: Cow MarathonTime Limit: 2000MSMemory Limit: 30000KTotal Submissions: 2672Accepted: 1317Case Time Limit: 1000MSDescriptionAfter hearing about the epidemic of obesity in the USA, Farmer John wants his cows to get more exercise, so he has committed to create a bovine marathon for his cows to run. The m 阅读全文

posted @ 2012-08-22 16:25 yumao 阅读(299) 评论(0) 推荐(0)

导航