Need help in understanding SUMSUMS problem

Problem : SUMSUMS - Summing sums


Problem link: https://online.codingblocks.com/app/player/158115/content/165260/5126/code-challenge


I am not able to think of other than matrix exponentiation approach which will give TLE for large inputs.
So I checked the editorial but I am finding it difficult to understand.


Can someone please explain the editorial?

Hey @thirumeni.m07

this question is not based on matrix exponentiation this is an observation based question refer this for some hints
https://turing13.com/2017/10/28/spoj-sumsum-enjoy-sum-with-operations/

1 Like

You meant this link - https://github.com/tr0j4n034/SPOJ/blob/master/SUMSUMS.cpp right?
Finally, I am able to see the pattern.
Feeling so good now :smile:
Thank you Kartik

Follow whatever you are comfortable with

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

1 Like