← 返回 walmartlabs 的题目列表Validate Nonogram
类型:online_judge
Determine if a given Nonogram is valid.
Input
char[][] that represents the Nonogram matrix.
int[][] hint arrays for each row and column.
Output
Boolean value indicating whether the generated pattern matches the hints.
Example
Input
[[['W','W','W','W'], ['B','W','W','W'], ['B','W','B','B'], ['W','W','B','W'], ['B','B','W','W']], [],[1],[1,2],[1],[2], [[2,1],[1],[2],[1]]]