编程介的小学生 2017-04-06 11:04 采纳率: 20.5%
浏览 809
已采纳

BiliBili

Shirai Kuroko is a Senior One student. Almost everyone in Academy City have super powers, and Kuroko is good at using it. Her ability is "Teleporting", which can make people to transfer in the eleven dimension, and it shows like moving instantly in general people's eyes.

Railgun_Kuroko.jpg
In fact, the theory of the ability is simple. Each time, Kuroko will calculate the distance between some known objects and the destination in the eleven dimension so that Kuroko can get the coordinate of the destination where she want to go and use her ability.

Now we have known that the coordinate of twelve objects in the eleven dimension Vi = (Xi1,Xi2, ... ,Xi11), and 1 <= i <= 12. We also known that the distance Di between the destination and the object. Please write a program to calculate the coordinate of the destination. We can assume that the answer is unique and any four of the twelve objects are not on the same planar.

Input

The first line contains an integer T, means there are T test cases. For each test case, there are twelve lines, each line contains twelve real numbers, which means Xi1,Xi2, ... ,Xi11 and Di. T is less than 100.

Output

For each test case, you need to output eleven real numbers, which shows the coordinate of the destination. Round to 2 decimal places.

Sample Input

1
1.0 0 0 0 0 0 0 0 0 0 0 7.0
0 1.0 0 0 0 0 0 0 0 0 0 7.0
0 0 1.0 0 0 0 0 0 0 0 0 7.0
0 0 0 1.0 0 0 0 0 0 0 0 7.0
0 0 0 0 1.0 0 0 0 0 0 0 7.0
0 0 0 0 0 1.0 0 0 0 0 0 7.0
0 0 0 0 0 0 1.0 0 0 0 0 7.0
0 0 0 0 0 0 0 1.0 0 0 0 7.0
0 0 0 0 0 0 0 0 1.0 0 0 7.0
0 0 0 0 0 0 0 0 0 1.0 0 7.0
0 0 0 0 0 0 0 0 0 0 1.0 7.0
7.0 0 0 0 0 0 0 0 0 0 0 11.0
Sample Output

-2.00 -2.00 -2.00 -2.00 -2.00 -2.00 -2.00 -2.00 -2.00 -2.00 -2.00

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-04-20 15:42
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图2.0 版本点聚合中Marker的位置无法实时更新,如何解决呢?
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题