# coding:utf-8 MOD = 1000000007 fact = [1]*2000010 inv = [1]*2000010 invfact = [1]*2000010 for i in range(2, 2000010, 1): inv[i] = inv[MOD%i]*(MOD-MOD//i)%MOD fact[i] = fact[i-1]*i%MOD invfact[i] = invfact[i-1]*inv[i]%MOD def c(n, r): if n