#include <vector> class Solution { public: int uniquePaths(int m, int n) { //计算组合数 if (m > n) { return uniquePaths(n, m); } double num = 1; for (int i = m + n - 2, j = m - 1; i >= n; i--, j--) { num = num * i / j; } ...