[help] CSES-Coin Combinations I && II got AC using buttom up DP but TLE using top up DP

Revision en1, by epsilon_delta, 2021-11-02 14:34:07

please help why TLE,
is there any logical error or something else??

Combinations-I submission
Combinations-II submission

Spoiler
Tags help, #cses, topdown

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English epsilon_delta 2021-11-02 14:35:08 9
en1 English epsilon_delta 2021-11-02 14:34:07 649 Initial revision (published)