luogu#P2265. 路边的水沟
路边的水沟
Background
There is a huge ditch network in a certain city, which can be approximated as an rectangular grid. A sluice gate is installed at every grid point. We call any path from the sluice gate at the bottom-right corner of the network to the sluice gate at the top-left corner a “water flow.”
Problem Description
Given the length and width of the ditch network, find the number of water flows that only move left and up.
Input Format
The input consists of line containing two integers and .
Output Format
Output a single integer , the number of water flows. Since the answer can be large, output the result modulo .
3 5
56
Hint
For of the testdata, .
For of the testdata, .
For of the testdata, .
For of the testdata, .
Translated by ChatGPT 5