编程介的小学生 2019-09-27 19:43 采纳率: 20.5%
浏览 81

Build Fences 的编写技术

Problem Description
Winter is coming , chicks are preparing building fences to protect from cold wind.
They are going to use the limited fences to surround some trees , they will either make some trees out of the fences or leave them inside[the first image, OK].

They won't make the fences touch trees outside and the fences should always be tighten.[the second image, forbidden]

(touch: two things have one or more points in common.)
Also , they want their living space as large as possible ,only the light blue districts are their living space.
The trees' coordinates and their radius are given. No trees will touch each other.
You can use a fence whose length is L , what's the largest area the chicks can live?

Input
T(<=20) in the first line indicating case number.
For each case, n(1<=n<=16) , d(0<d<=1000) , L(0<=L<=1000000).
d : diameter of the trees , float number.
L : length of the fence , float number.
The next n lines each has two float numbers, x(|x|<=1000) , y(|y|<=1000) , which are the coodinates of the trees' center.

Output
Tell the chicks what's their largest possible living space accurate to three decimal places.

Sample Input
2

1 1 1
1 1

4 1 30
1 1
4 4
1 4
4 1

Sample Output
0.000
12.644

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿
    • ¥15 回答4f系统的像差计算
    • ¥15 java如何提取出pdf里的文字?
    • ¥100 求三轴之间相互配合画圆以及直线的算法
    • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
    • ¥15 名为“Product”的列已属于此 DataTable
    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题