Count the coins: Difference between revisions

Content added Content deleted
Line 1,212: Line 1,212:
.
.
chind = sum * 7 + kind
chind = sum * 7 + kind
if cache[chind] = 0
if cache[chind] > 0
call count sum - val[kind] kind r2
r = cache[chind]
call count sum kind - 1 r1
break 1
cache[chind] = r1 + r2
.
.
call count sum - val[kind] kind r2
r = cache[chind]
call count sum kind - 1 r1
r = r1 + r2
cache[chind] = r
.
.
call count 100 4 r
call count 100 4 r