编程介的小学生 2017-09-20 05:39 采纳率: 0.2%
浏览 822
已采纳

Disassembly Direction

Disassembly is a sub-phase of Assembly Sequence Planning. When we initiate a removal from a sub-assembly, we usually start with a list of constraints between the sub-assembly to be removed and the remaining part. Those constraints typically contain some surface-pairs.

When you remove the sub-assembly away, you can only move along the direction set by the normal of the surface. The range of the possible disassembly direction is a (closed) half sphere.

When there are several such constraints, you have to satisfy all of them, or it is impossible to remove this sub-assembly.

Given a list of constraints, you are to judge weather it is possible to remove the sub-assembly. If it is possible, you will give a possible disassembly direction.

Input

Input contains multiple tests. Each tests start with a positive integer n (n < 100), the number of constraints to follow. A case with n = 0 indicates the end of input. This case is not to be processed.

The following n lines contain one vector each line, in the form of x y z. This is the normal of the surface and will not be zero.

Output

Output one line for each case. If there exists a possible disassembly direction, you can output any one, in the form of three floating numbers separated by a single space. Print "Impossible" otherwise.

Sample Input

2
0 0 1
1 0 0
6
0 0 1
0 1 0
1 0 0
-1 0 0
0 -1 0
0 0 -1
0

Sample Output

1 0 1
Impossible

  • 写回答

1条回答 默认 最新

  • threenewbee 2017-10-05 09:22
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 指导如何跑通以下两个Github代码
  • ¥15 大家知道这个后备文件怎么删吗,为啥这些文件我只看到一份,没有后备呀
  • ¥15 C++为什么这个代码没报错运行不出来啊
  • ¥15 一道ban了很多东西的pyjail题
  • ¥15 关于#r语言#的问题:如何将生成的四幅图排在一起,且对变量的赋值进行更改,让组合的图漂亮、美观@(相关搜索:森林图)
  • ¥15 C++识别堆叠物体异常
  • ¥15 微软硬件驱动认证账号申请
  • ¥15 GPT写作提示指令词
  • ¥20 根据动态演化博弈支付矩阵完成复制动态方程求解和演化相图分析等
  • ¥15 华为超融合部署环境下RedHat虚拟机分区扩容问题