System of Linear Equations

Time Limit: 2000ms
Memory Limit: Unknown KB
This problem will be judged on PKU. Original ID: 3477
64-bit integer IO format: %lld      Java class name: Main
Special Judge

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.

mn
a11a12a1nb1
a21a22a2nb2
am1am2amnbm

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.

Sample Input

2 3
1 1 0 36
-1 1 -1 4

Sample Output

16
20
0

Source

Language: 
Theme: 
Share Code? 

Powered by NB231 | Current Style: .