daniel14311531's blog

To love and win is the best thing. To love and lose is the next best thing.

Graph on a Table

题意

有一张 n×m n \times m 的网格图,每次可以从 (x0,y0) (x_0, y_0) 跳到 (x1,y1) (x_1, y_1) 当且仅当 x0<x1 x_0 < x_1 且 y0<y1 y_0 < y_1 ,同时这两个点都要在同一个给出的矩形中,求最多可以经过多少个网格并求出方案数对 109+7 10^9 + 7 取模。

阅读全文 »