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

建议使用的浏览器:

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

1266:Cover an Arc.

题目描述
A huge dancing-hall was constructed for the Ural State University's 80-th anniversary celebration. The size of the hall is 2000 * 2000 metres! The floor was made of square mirror plates with side equal to 1 metre. Then the walls were painted with an indelible paint. Unfortunately, in the end the painter flapped the brush and the beautiful mirror floor was stained with the paint. But not everything is lost yet! The stains can be covered with a carpet.
Nobody knows why, but the paint on the floor formed an arc of a circle (a centre of the circle lies inside the hall). The dean of the Department of Mathematics and Mechanics measured the coordinates of the arc's ends and of some other point of the arc (he is sure that this information is quite enough for any student of the Ural State University). The dean wants to cover the arc with a rectangular carpet. The sides of a carpet must go along the sides of the mirror plates (so, the corners of the carpet must have integer coordinates).
You should find the minimal square of such a carpet.
输入解释
The input consists of six integers. At first the coordinates of the arc's ends are given. The co-ordinates of an inner point of the arc follow them. Absolute value of coordinates doesn't exceed 1000. The points don't belong the same straight line. The arc lies inside the square [-1000,1000] * [-1000,1000].
输出解释
You should write to the standard output the minimal square of the carpet covering this arc.
输入样例
476 612
487 615
478 616
输出样例
66

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

源链接: POJ-1266

最后修改于 2020-10-29T05:59:26+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 10000