https://mirror.codeforces.com/gym/102644/problem/A
for this problem i thought of the recurrence relation and then applied matrix exponentitation, my relation was (1-p)*f(n-1)+p*p*f(n-2);
why is this relation wrong?
help with this recurrence relation
https://mirror.codeforces.com/gym/102644/problem/A
for this problem i thought of the recurrence relation and then applied matrix exponentitation, my relation was (1-p)*f(n-1)+p*p*f(n-2);
why is this relation wrong?