Why does it happen? (Post — 2)

Правка en1, от slow.coder, 2015-10-06 09:11:38

SPOJ Problem: Tiling a Grid With Dominoes

In short: You are given the value of N, now determine in how many ways you can completely tiled a 4xN rectangle with 2x1 dominoes.

We can solve this problem using DP technique, when the recurrence relation is:

f[n] = f[n - 1] + 5 * f[n - 2] + f[n - 3] - f[n - 4];

Here is a great explanation: count the ways to fill a 4×n board with dominoes.

Теги tiling blocks

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский slow.coder 2015-10-06 15:23:47 90
en1 Английский slow.coder 2015-10-06 09:11:38 586 Initial revision (published)