#include #define MODU 1000000007 #define ll long long using namespace std; ll getFact(int n) { ll sum=1; for(int i=2;i<=n;i++) sum=(sum*i)%MODU; return sum; } int check(int arr[],int start,int end) { for(int i=start+1;i<=end;i++) { if(arr[i] 0; j--) C[j] = (C[j] + C[j-1])%p; } return C[r]; } int nCrModpLucas(int n, int r, int p) { if (r==0) return 1; int ni = n%p, ri = r%p; return (nCrModpLucas(n/p, r/p, p) * nCrModpDP(ni, ri, p)) % p; } ll ncr(int n,int r) { ll sum=nCrModpLucas(n,r,MODU); return sum; } int main() { int n; scanf("%d",&n); int arr[n]; for(int i=0;i