http://projecteuler.net/index.php?section=problems&id=114

普通のDP

import Data.Array.IArray
measure n = mArr!n
where mArr = listArray (,n). map m $ [..n]::Array Int Integer
m n | n <  3 = 1
| n == 3 = 2
| n >  3 = sum [mArr!(n-m-1)| m<-:[3..n-1]] + 1
main = print.measure$50