|
|
suppose everything is good for the first 'i' columns, but the column is 'i' bad, then let's try to find such 'j' that, by doing the operation, our new column 'i' will become good, what properties should the column 'j' have ? If you can find 'j' just do operation swap (i, j) Can someone give me some hints about what #test 11 is? Can anyone explain the sample: 3 0 0 0 1 1 0 1 1 0
1 1 3 I dont understand it. The resulting matrix is: 0 1 1 0 1 1 0 0 0 Thanks! I think the correct final matrix must have all 1(s) above or lie on the main diagonal. Any hint to solve this problem ? Edit: nvm, solved it, nice problem with simple algorithm :D Edited by author 12.10.2010 11:07 Edited by author 12.10.2010 11:07 This problem very similar with 1042- central heating Each move (i,j) make switching (and replacing) of some set of pairs of cells. Thus we have linear system over field {0,1) No, the solution is much simplier. You just need to investigate the properties such an operation has. Edited by author 08.12.2016 15:31 |
|
|