Need help solving Probelm

Правка en1, от peaceful_warrior, 2015-06-15 10:14:48

Problem link I have seen the solution but i dont understand how the recurrance relation is dp[i]=dp[i-1]+dp[i-2]+2;

Can somebody explain it to me.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский peaceful_warrior 2015-06-15 10:14:48 226 Initial revision (published)