C version of the nonogram problem, work in progress