Ensure that you are logged in and have the required permissions to access the test.
Given a square binary grid, you are to find the number of ways to reach the bottom-right corner from the top-left corner of the grid. The rules for the same are follows:
Input:
First line is an integer N ( N <= 100), which is the size of the grid. N lines follow, each containing N space separated numbers which are either '0' or '1'.
Output:
Print a single line which is the answer to the given puzzle.
9 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0