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!!!!
Auto comment: topic has been updated by Rahil_gupta (previous revision, new revision, compare).
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
Thank You very much, will have to keep small things in check next time. But again thank you very much.