Problem 114
コンテンツ
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
作成者 Toru Mano
最終更新時刻 2023-01-01 (c70d5a1)