Vedkribhu's blog

By Vedkribhu, history, 4 years ago, In English

Problem: link. I can find number of ways to get sum in that range using dp, but the total number of ways is 6**100 that is impossible to store(or I don't see how to). How to solve this?

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

»
4 years ago, # |
  Vote: I like it +3 Vote: I do not like it

I you count the probs that way you can simply use double for dp array, instead of long long.