shinghalrishabh's blog

By shinghalrishabh, 10 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?
»
10 years ago, # |
  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.

»
10 years ago, # |
  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

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why did you do that?

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why are you trying to help him even though the first comment clearly indicates that the question is from a running contest ?