#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) memset(a,0xff,sizeof(a)) //------------------------------------------------------- ll N,L,R; ll mo=1000000007; ll fact[101010],factr[101010],rev[101010]; ll modpow(ll a, ll n = mo-2) { ll r=1; while(n) r=r*((n%2)?a:1)%mo,a=a*a%mo,n>>=1; return r; } int LIS(vector v) { int pre=0,len=0; FORR(a,v) { if(a>pre) pre=a,len++; } return len; } ll dp[65]; void solve() { int i,j,k,l,r,x,y; string s; fact[0]=factr[0]=1; for(i=1;i<=100100;i++) { fact[i]=fact[i-1]*i%mo; factr[i]=modpow(fact[i]); rev[i]=modpow(i); } cin>>N>>L>>R; dp[1]=fact[N-1]; for(i=2;i<=N-1;i++) { for(j=63;j>=1;j--) { (dp[j+1]+=dp[j]*rev[i])%=mo; dp[j]=(dp[j]-dp[j]*rev[i]%mo+2*mo)%mo; } } /* ll X=0,Y=0; for(i=1;i<=10;i++) { cout<,vector>> M; vector A; FOR(i,N) A.push_back(i+1); do { vector B=A; FOR(i,N-1) if(B[i]>B[i+1]) swap(B[i],B[i+1]); M[B].push_back(A); /* FORR(v,A) cout< R; FORR(b,M) { FORR(v,b.first) cout<