Fast fibonacci time ;imit

https://ide.codingblocks.com/s/169218 …time limit exceding…how to further optimize code??

You shall return T[0][0]+T[0][1] as answer, also to avoid TLE, for taking power, use fast exponentiation.

https://ide.codingblocks.com/s/169447…still not working…i’ve used matrix exponentiation,nd returned t[0][0]+t[0][1]

https://online.codingblocks.com/app/player/21945/content/34932/6720?start=0&tab=problem
Please have a look at this Hint Video for Fast Fibonacci.

hi sir…i got my mistake…,in code: https://ide.codingblocks.com/s/169218 , in line 20, i was writing else return mult(pow(A,p/2),pow(A,p/2)); , instead of this i should have written vector<vectorB=pow(A,p/2); return mult(B,B); after writing this,my code is working correct…this is because function was called twice,hence tle was coming for 10^9th term,thxx for your support