当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2333:Beach cut

题目描述
The seashore is represented by a polyline without self-intersections, described by a sequence of vertices (x1, y1), ... (xN, yN). It also has a property that xi < xi + 1. The sea is above the line, and the beach -- below.

Your program must connect two vertices with a straight line not longer than L chosen so as to maximize the beach area enclosed between that line and the shore. The line must not intersect with the sea and may only touch, not intersect, the shore polyline.
Constraints
3 ≤ N ≤ 5000, 0 ≤ xi, yi, L ≤ 1000000
输入解释
Input contains integer numbers N L, followed by N pairs of integers x1 y1 … xN yN.
输出解释
Output must contain a single floating point value -- the maximum area that can be cut (it may be zero). The area must be output exactly, i.e. without any rounding at all.
输入样例
5 4
0 0  1 3  2 0  3 3  4 0
输出样例
6

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-2333

最后修改于 2020-10-29T06:29:57+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
5000 65536