Rahil_gupta's blog

By Rahil_gupta, 6 hours ago, In English

Hi! I was trying this problem In this problem E-decode of round 962 (1996E - Decode) , when I was using a long long type "variable sum" while going from left to right (297131526) it was giving wrong answer on test case 6. But when I switched to an "suffix array sums" (297132422) it is Accepted, even though both sums array and variable sum are equivalent. I cannot understand this and I know I might be missing something silly and, but still any help is highly appreciated. THANK YOU VERY MUCH!!!!

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

»
6 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Rahil_gupta (previous revision, new revision, compare).

»
5 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

you have to initialize the value for accumulate function as $$$0ll$$$ not $$$0$$$ (to consider it as long long), I changed it in the first code and it got accepted 297136677

  • »
    »
    5 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thank You very much, will have to keep small things in check next time. But again thank you very much.