Yath's blog

By Yath, history, 2 years ago, In English

The answer is coming 0 instead of some positive value for some test cases Submission: https://codeforces.me/contest/1703/submission/164043486

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Typecast pow into long long .it might work.

»
2 years ago, # |
Rev. 3   Vote: I like it +2 Vote: I do not like it
Spoiler
  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thank you!!! This worked and also I get it why it is not enough to take dp[n][i] while calculating the final answer.

    • »
      »
      »
      2 years ago, # ^ |
      Rev. 2   Vote: I like it +1 Vote: I do not like it
      Spoiler