I have been given an array of length of n. I have to find the product of products of elements of all subsequences of length k.
For e.g
Array -> [1,2,3,4] n=4,k=2
Subsequences -> {1,2} {1,3} {1,4} {2,3} {2,4} {3,4}
Products -> 2 3 4 6 8 12
Product of products 2*3*4*6*8*12 = 13824
It can be done easily if n & k are small but I am not able to get the result when 1<=n<=2000, 1<=k<=n. The answer can be too large so we can give the answer modulo 1000000007. Can someone tell me how to do it for large n & k?