Save the Princess

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=229&page=show_problem&problem=3072 [PDF](https://uva.onlinejudge.org/external/119/p11921.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11921/e3cc710e825af595dd456c523560f4e639a063bd.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11921/274415f5faaa7edb4b2ae1514ff8bd83682902b2.png)

输出格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11921/a5445c15af9d5caac65bda61f26d9e2ede4c50b5.png)

输入输出样例

输入样例 #1

2
-3 2 2 -2
2
0 0 2
0 -5 3
-3 0 4 0
2
0 5 4
0 -3 3

输出样例 #1

Case 1: 8.14159265
Case 2: 7.00000000