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

建议使用的浏览器:

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

6398:Pizza Hub

Special Judge 特殊评判
题目描述
Coffee Chicken has started a new restaurant named Pizza Hu...b! It provides various styles of pizzas, hamburgers, sandwiches, coffee, chickens and many other awesome Western cuisines. Welcome to Pizza Hub after this Multi-University Training Contest!

Since the pizzas are so exquisite, it is never a bad thing to design nice paper pads for them. The pizzas provided in Pizza Hub are sliced into triangles. The rectangular-shaped paper pads are cut from a paper strip of fixed width which is long enough. The pizza should be placed entirely on the pad; however, their borders are allowed to touch. Also, you are allowed to rotate the pizza.

As the customized paper strip is rather expensive, minimizing the size of the pizza pad can save a lot of money. Can you determine the minimum possible height of the pizza pad, given the width of the paper strip? The following picture illustrates the first sample test case.

输入解释
The first line of the input is a single integer $T$ $(1 \leq T \leq 50000)$, the number of test cases.

Each test case is a single line of seven integers $x_1, y_1, x_2, y_2, x_3, y_3$ $(0 \leq x_1, y_1, x_2, y_2, x_3, y_3 \leq 10000)$ and $w$ $(1 \leq w \leq 10000)$, where $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$ are Cartesian coordinates of the vertices of the pizza, and $w$ is the width of the strip. It is guaranteed that the three vertices are not collinear.
输出解释
For each test case, display the minimum height of the pizza pad with an absolute or relative error of no more than $10^{-6}$. If it is impossible to make a pizza pad, display $\texttt{impossible}$ instead.
输入样例
2
0 0 3 0 0 4 10
0 0 3 0 0 4 1
输出样例
2.400000000
impossible
来自杭电HDUOJ的附加信息
Recommend chendu

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6398

最后修改于 2020-10-25T23:30:59+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
3000/3000MS(Java/Others) 131072/131072K(Java/Others)