luogu#P4894. GodFly 求解法向量
GodFly 求解法向量
Background
“Differentiate blindly when you see a function, and set up a coordinate system blindly when you see geometry.” This is a common trait of stubborn learners.
As a stubborn learner who likes setting up coordinate systems, GodFly often needs to compute normal vectors.
Problem Description
On plane , there are two intersecting vectors and . If is a normal vector of plane , then:
$$\begin{cases} x \times x _ 1 + y \times y _ 1 + z \times z _ 1 = 0 \\ x \times x _ 2 + y \times y _ 2 + z \times z _ 2 = 0 \end{cases}$$You are now given the coordinates of and . Find one normal vector and output its coordinates.
Input Format
This problem contains multiple test cases. For each test case, one line contains six numbers: .
Output Format
For each test case, output three numbers , separated by spaces.
Separate outputs of different test cases with a blank line. The coordinates of the normal vector cannot all be .
1 2 3 3 2 1
1 -2 1
Hint
Constraints
All coordinates (including the answer) are within the -bit integer range.
- For of the testdata, there is only one test case.
- For of the testdata, the number of test cases , and all input coordinates are positive integers with absolute values not exceeding .
Hint
This problem uses Special Judge. You may output any valid solution.
Translated by ChatGPT 5