Home > Back-end >  Turn a problem
Turn a problem

Time:02-06

Theme: 3 * 3 matrix with white block (0) and black (1), give each column in a row of black block number, deduce the style of this matrix (one and only subject to ensure matrix), in particular, if input 11, is between two black pieces of a white block,

I think available DFS search, but not too will write code, you who can help with?

The sample input:
11 1
11 1

The sample output:
1 0 0
1 0 1
1 0 0

CodePudding user response:

Permutation and combination can
The first line has a 1, 001010101 three
The second line has two 1, 110101011 three, interval 0 only 101 in a
The third line has a 1, 001010101 three
The above each selected groups, and then determine whether each column to meet the input conditions can


CodePudding user response:

reference 1st floor qybao response:
permutation and combination can
The first line has a 1, 001010101 three
The second line has two 1, 110101011 three, interval 0 only 101 in a
The third line has a 1, 001010101 three
The above each selected groups, and then determine whether each column to meet the input conditions can
can trouble you to lay the code

CodePudding user response:

Why nobody sigh
  • Related