410485: GYM104025 K ZYW with tutors
Description
ZYW has high academic abilities so many tutors want to work with ZYW. However, ZYW did not want to choose casually, so he gave the tutors a task. The tutor who achieves the best results will be favored by ZYW.
The problem is as follows. Given a $$$n \times n$$$ matrix $$$A$$$, you can choose a number in the matrix and change it to any real number, but you can only do this at most once. You need to minimize $$$|\det(A)|$$$, where $$$\det(A)$$$ represents the determinant of the matrix $$$A$$$.
ZYW can of course compute the result immediately, but your tutor is not very good at this. Can you help your tutor? Note that you do not need to output exactly how the change was made.
InputThe first line contains an integer $$$n\ (1\le n\le 100)$$$.
For the following $$$n$$$ lines, each line contains $$$n$$$ integers, where the $$$j$$$-th number of the $$$i$$$-th line indicates $$$A_{i,j}\ (-10^9\le A_{i,j}\le 10^9)$$$.
OutputPrint a single number — the minimum value of $$$|\det(A)|$$$.
If the standard answer is $$$a$$$, and your answer is $$$b$$$, your answer will be considered correct if $$$|\frac{a-b}{\max(a,1)}|<10^{-6}$$$.
ExampleInput3 1 1 4 5 1 4 0 0 0Output
0