Yath's blog

By Yath, history, 4 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

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

Typecast pow into long long .it might work.

»
4 years ago, hide # |
← Rev. 3  
Vote: I like it +2 Vote: I do not like it
Spoiler
  • »
    »
    4 years ago, hide # ^ |
     
    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.

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