Wall
Description
Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he would not listen to his Architect's proposals to build a beautiful brick wall with a perfect shape and nice tall towers. Instead, he ordered to build the wall around the whole castle using the least amount of stone and labor, but demanded that the wall should not come closer to the castle than a certain distance. If the King finds that the Architect has used more resources to build the wall than it was absolutely necessary to satisfy those requirements, then the Architect
题目:http://poj.org/problem?id=1113
Time Limit: 1000MS Memory Limit: 10000K
Total Submissions: 28586 Accepted: 9556Description
Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he would not listen to his Architect's proposals to build a beautiful brick wall with a perfect shape and nice tall towers. Instead, he ordered to build the wall around the whole castle using the least amount of stone and labor, but demanded that the wall should not come closer to the castle than a certain distance. If the King finds that the Architect has used more resources to build the wall than it was absolutely necessary to satisfy those requirements, then the Architect

这道ACM题目要求在平面直角坐标系中,根据城堡多边形的顶点坐标计算其凸包周长,并加上一个圆的周长,圆的半径为输入的第二个数。解题关键是使用求凸包的算法,然后进行四舍五入的精度处理。 %.0lf 用于输出结果时进行四舍五入。
最低0.47元/天 解锁文章
5868

被折叠的 条评论
为什么被折叠?



