Here is the problem.

If the input is

1

2 2

2 1

2 1

Ans should be f0 * sigma2 + f1 * sigma1 i.e. 2 * 1+2 * 1=4.

But all accepted solution like this are giving 5 please explain.

Please Help .

Here is the problem.

If the input is

1

2 2

2 1

2 1

Ans should be f0 * sigma2 + f1 * sigma1 i.e. 2 * 1+2 * 1=4.

But all accepted solution like this are giving 5 please explain.

Please Help .

Thanks for the reply, in the question it is given

si = fi - 1 * sigma1 + … + fi - m * sigmam

so shouldn`t s2 be equal to f1 * sigma1+f0 * sigma2.

Please help where I am going wrong

Even Considering only 2 values of sigma

If the input is

1

2 2

0 1

0 1

Ans should be f0 * sigma2 + f1 * sigma1 i.e. 0 * 1 + 0 * 1 = 0. But all accepted solution like this are giving 1 please explain.

Please Help .

Still stuck !!!

Please Help !!!

I just realized, the input itself is wrong, as sigma variable can take only 2 values. But I still could not figure out how their answer is coming 5…

Please Help !!!