Problem 1700. Solve the picross! (Easy)
Solve the picross!
http://en.wikipedia.org/wiki/Nonogram
The arguments (horz and vert) are cells containing the clues, e.g:
horz = { 2, [1, 1], [] }; vert = { 2, 1, 1 };
means
![](http://img15.hostingpics.net/thumbs/mini_268468DemoEmptyPicross.png)
You have to return the completed picross, a logical or double matrix with a 0 for a white case and a 1 for a black case. If we solve the previous example:
![](http://img15.hostingpics.net/thumbs/mini_676179DemoCompletedPicross.png)
So, the output argument should be:
picross = [ 1 1 0 ; 1 0 1 ; 0 0 0 ];
Have fun!
See also: http://www.mathworks.fr/matlabcentral/cody/problems/1701-solve-the-picross-hard
Solution Stats
Problem Comments
-
2 Comments
Nope, it's not easy. A grid of 20x20 squares is already considered hard by regular players because we have to keep in mind several possible intersections between possible solutions.
Easy??????
Solution Comments
Show commentsProblem Recent Solvers9
Suggested Problems
-
2303 Solvers
-
Calculate the Levenshtein distance between two strings
1420 Solvers
-
354 Solvers
-
Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
138 Solvers
-
98 Solvers
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!