223. Paths Through a Grid
You are at the top-left corner of an m by n grid and want to reach the
bottom-right. You may only move right or down.
Print how many distinct paths there are.
The recursion is direct: the number of paths to a cell is the number of paths to the cell above it plus the number to the cell on its left. Cells in the top row and left column have exactly one path.
Written plainly this recomputes the same cells enormously many times. A grid of 20 by 20 has about 35 billion paths and only 400 cells, which tells you exactly what to store.
Constraints - `1 ≤ m ≤ 20` - `1 ≤ n ≤ 20`
Input
A single line containing two integers m and n, the number of rows and columns.
Output
Print one integer, the number of distinct paths.