Piet Souris wrote:But I meant calculating permutations...
Well, I hope I have time to implement what I wrote about, since from tomorrow I'll be on holidays for a week, without internet
Stephan van Hulst wrote:1000000007 is a prime, which makes calculating the final result much easier if you already know certain properties about your answer.
Piet Souris wrote:Well, after a nice vacation with better weather than expected (but worse than hoped for) I implemented what I wrote before. However, it was trickier than I thought, and the code is also much longer than expected. But I did not write for brevity, but for ease of coding.