Time Limit:3000ms Memory Limit:65536KB
There are k same bags and n distinct balls ,
in how many ways can we put the n balls into the k bags
without any ball left out of the bags ,
some bags may leave empty .
Two integers per line , k (1<=k<=10) and n (1<=n<=10^5) ,
One number per line , the number of different ways of putting n distinct balls into k same bags mod 512.