Re: I cant understand the problems!!!!

Posted by

c_pp 2 Jan 2017 23:36

let:

2D array[N][N], and transversal is a cells of N , which for each row and each column has one cell in the transversal.

for example:

2D array:

1) 2) 3)

=============

1)| 1 2 3

2)| 4 5 6

3)| 7 8 9

transversal-1: { (1;1) , (2;2) , (3;3) } // (row, col) -- coordinate of a cell, .

transversal-2: { (1;1) , (2;3) , (3;2) }

transversal-3: { (1;2) , (2;1) , (3;3) }

transversal-4: { (1;2) , (2;3) , (3;1) }

transversal-5: { (1;3) , (2;1) , (3;2) }

transversal-6: { (1;3) , (2;2) , (3;1) }

Note that, there 1*2*3...*N = N! different transversals exist.

Now, about problem: 2D array with 2N+1 x 2N+1 size , elements '+' or '-'.

And allowed operation: can change sign to opposite in all cells in a transversal.

You are asked to determine if it is possible to obtain a table containing not more than 2N cells with the sign "+" by a sequence of such operations

Good Luck!