#OLD364. Elliott and Det
Elliott and Det
Description
Recently, Elliott became interested in programming. Under the guidance of the teacher, he began to practice programming. At first he encountered a difficult problem, gave a determinant(Det()), and asked for his algebraic remainder().This question puzzled him for a long time, so he posted a blog on the Internet: given a Det() , calculate one of the algebraic remainders().If you know the solution of this question, are you willing to help him?
Format
Input
First contains an integer , indicating N-order determinant.
Next lines contains integers which describe the N-order matrix.
The line contains two integers , the positions of algebraic remainders() to be computed.
Output
Print of module of .
Samples
2
1 2
3 4
1 2
-3
Hint
The row and column are removed from det(), and the elements are left in the same order as before, an n-1-order det()
$ Det= \begin{vmatrix} 1 & 2 \\\ 3 & 4 \\\ \end{vmatrix},M_{12}= 3, A_{12}=(-1)^{1+2}M_{12}=-3 $