P3389 [Template] Gaussian Elimination

Background

If you want to better test the Gaussian elimination template, after solving this problem, try [SDOI2006 线性方程组](https://www.luogu.com.cn/problem/P2455).

Description

Given a system of linear equations, solve it. $$ \begin{cases} a_{1, 1} x_1 + a_{1, 2} x_2 + \cdots + a_{1, n} x_n = b_1 \\ a_{2, 1} x_1 + a_{2, 2} x_2 + \cdots + a_{2, n} x_n = b_2 \\ \cdots \\ a_{n,1} x_1 + a_{n, 2} x_2 + \cdots + a_{n, n} x_n = b_n \end{cases}$$

Input Format

The first line contains a positive integer $n$. Lines $2$ to $n+1$ each contain $n+1$ integers, which are $ a_1, a_2, \dots ,a_n$ and $b$, representing one equation.

Output Format

Output $n$ lines, one number per line. The $i$-th line is $x_i$ (rounded to $2$ decimal places). If there is no solution or the solution is not unique, output `No Solution` on the first line.

Explanation/Hint

This problem uses a special judge to handle cases where floating-point issues might produce `-0.00`. If some $x_i$ rounds to `0.00`, then both `-0.00` and `0.00` are accepted. Constraints: $1 \leq n \leq 100, \left | a_i \right| \leq {10}^4 , \left |b \right| \leq {10}^4$. It is guaranteed that if there is a solution, then all solutions satisfy $|x_i|\le 10^3$, and the rounded results of $x_i\pm 10^{-6}$ and $x_i$ are the same (i.e., small precision errors will not change the rounded result). Translated by ChatGPT 5