程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程解疑 >> numbers-System of Linear Equations

numbers-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.

Sample Input

2 3
1 1 0 36
-1 1 -1 4
Sample Output

16
20
0

最佳回答:


http://blog.csdn.net/u012302219/article/details/51456958

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved