Fibsum mathematics

please look into it.it passes sample test cases but fails all test cases

@Sfo_2302,
Please check the complexity of your code.

please make corrections in the code and rectify my mistake. im not able to get the mistake

@Sfo_2302,
I told you already, check the complexity of your code. Me giving you code won’t help anyone. Atleast try to find your mistake, ask here if you need for help regarding that. Simply asking for code won’t help you.

@Sfo_2302,

for(ll i=2;i<=m;i++){
		c=a+b;
		v.push_back(c);
		a=b;
		b=c;
	}

The complexity of your code is O(m), which is too large for the given problem. So, matrix exponentiation is required to reduce from linear to logarithmic.

Here is the code link.