shinghalrishabh's blog

By shinghalrishabh, 11 years ago, In English

((n+m)Cn) %mod here n and m can be upto 10^9 and mod is 10^6+3. Can someone help me in this calculating the correct answer

  • Vote: I like it
  • -24
  • Vote: I do not like it

| Write comment?
»
11 years ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

You should not ask for the solution of a problem from a running contest. Try yourself or wait for the contest to end.

»
11 years ago, hide # |
 
Vote: I like it -14 Vote: I do not like it

look at this thread for calculating N!%M in O(MlogN)

and use this fact N! - 1%M = (N!%M)M - 2%M