编程介的小学生 2017-04-06 11:04 采纳率: 0.9%
浏览 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 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵