#include #include using namespace std; using namespace atcoder; typedef modint1000000007 mint; typedef long long ll; //defmodfact const int COMinitMAX = 1100000; mint fact[COMinitMAX+1], factinv[COMinitMAX+1]; void modfact(){ fact[0] = 1; for (int i=1; i<=COMinitMAX; i++){ fact[i] = fact[i-1] * i; } factinv[COMinitMAX] = fact[COMinitMAX].inv(); for (int i=COMinitMAX-1; i>=0; i--){ factinv[i] = factinv[i+1] * (i+1); } } mint cmb(int a, int b){ if (a> h >> w; mint r = 1; mint ans = 0; for (int i=0; i