n=50000;
in the matrix expo n^3 not possible
Difficulty with time complexity
if your algorithm’s complexity is o(n^3),then for n=50000, will take a lot of time, let me explain how, in 1 second 10^8 operation can take place approximately at max so if time complexity is o(n^3) then it will take 125×10^12/10^8 seconds i. e. approx 10^6 seconds which is a lot of time and most of the online judge has time limit of 1 sec
yeah thats what i am saying but in the editorial video they have given this thing , so i am not sure how to continue
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/
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.