A valid American-style crossword grid is an n x n matrix of black (1) and white (0) squares satisfying: every white square is part of two words (across and down), all words are at least 3 letters, the grid is rotationally symmetric, and all white squares are connected. Given a grid, determine if it is valid. Input: first line n, then n lines each with n values (0 or 1). Output "true" or "false".
Example 1:
Example 2:
Constraints:
1 <= n <= 100 Grid values are 0 (white) or 1 (black)
Tags:
