#P3477. System of Linear Equations
System of Linear Equations
Description
Solve the system of linear equations
subject to
xi ≥ 0, ∀i = 1, 2, …, n.
Input
The input in is the following format with 1 ≤ m, n ≤ 100.
m n a11 a12 … a1n b1 a21 a22 … a2n b2 … … … … … am1 am2 … amn bm
All numbers except m and n are real numbers.
Output
If any solutions exist, output one of them in the following format.
x1 x2 … xn
Otherwise declare that the system is inconsistent by printing “impossible”. An special checker program that admits an absolute error of 10−10 is used to verify your results.
2 3
1 1 0 36
-1 1 -1 4
16
20
0
Source
POJ Founder Monthly Contest – 2007.12.30, frkstyc