CT29046

The Lattice Routes of the Pale segments

MediumL4 · Loop LordAcceptance: 0.0%XP: 35

Sara found an old ledger of segments in the ropewalk attic at the heron rookery of Longlegs. The margin notes pose a precise question. Task: On an r×c grid, move only right or down from (1,1) to (r,c). Print the number of routes mod 1000000007. Input format: One line: r and c. Output format: Print the route count mod 1000000007. Constraints: 1 <= r,c <= 500.

Example 1:

Input: 344 445
Output: 543276179

Example 2:

Input: 70 267
Output: 222551221

Example 3:

Input: 258 469
Output: 610620670

Constraints:

1 <= r,c <= 500.

Loading...
Test Cases:No test cases
No test cases available.
The Lattice Routes of the Pale segments - MEDIUM Coding Problem | CodeTikki