ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Турниры > IMPC16 Group Contests > задача:


F4. 50977 - Gaussian Elimination

IMPC16 Group Contests

Старт: 16.янв.2016 в 10:00:00
Финиш: 16.янв.2016 в 14:00:00
Турнир завершён!
• Турнирная таблица

Гость
• Вопросы к жюри (3)

Задачи турнира

• 24. 50876 - He is my cousin
• 25. 50877 - Friendly Queue
• 32. 50926 - School Mail Merge
• 33. 50927 - Health Expenses
• 34. 50928 - War Of Battleships
• 35. 50929 - Present from your uncles
• F1. 50841 - My grand-grand-grandfa...
• F2. 50936 - Saving the Soldiers
• F4. 50977 - Gaussian Elimination
• F5. 50978 - Albanian Coders
• F6. 50979 - Minimum access cost for...

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Prepared by Ibrahim Mesecan.

Gaussian Elimination

Gaussian elimination, also known as row reduction, is a method to solve linear equations. The method is named after famous mathematician Carl Friedrich Gauss. The equation ax1 + bx2 = c is called as linear equation where a, b and c are numerical coefficients and xi is called as unknown variable. The previous equation has two unknowns. And, the following equation has three unknowns ax1 + bx2 + cx3 = d. In order to solve a linear equation with n unknowns, you need to have n (distinct) linear equations. Note: The solution steps are explained in this document.

Question: You will be given n-linear equations with n-unknowns. Calculate the unknown variable values and show them.

Input specification
You will be given an integer in the beginning: the number of unknowns (n). In the following n lines, you will be given n integers where 0 ≤ n ≤ 50. The following n lines will give the result of n linear equations.

Output specification:
Show n floating point numbers with 3 digits precision

Sample Input
3
1 2 3
4 5 6
1 0 1
1
1
1
Sample Output
0 -1 1

Explanation: There are three linear equations given where the first equation is x + 2y +3z = 1. The coefficients are 0, -1 and 1. Then, the first equation means: (1 * 0) + (2 * -1) + (3 * 1) = 1



Для отправки решений необходимо выполнить вход.

www.contester.ru