#P1743. 矩阵 III

矩阵 III

Description

Given an n×mn \times m matrix, ask how many paths there are from the top-left corner to the bottom-right corner. Retain 17 significant digits (that is, starting from the 18th significant digit, output 0).

Input Format

A single line with two positive integers n,mn, m.

Output Format

The number of paths tt.

6 4
210

Hint

Constraints: 1n108,1m41 \le n \le 10^8, 1 \le m \le 4.

Translated by ChatGPT 5