Money change problem,

cant understand why am getting TLE
PLEASE HELP ME
I HAVE USED BOTTOM UP DP APPROACH

https://ide.codingblocks.com/s/48475

https://hack.codingblocks.com/contests/c/512/1026

i further improved my code actually in my prev code there was some memory allocation problem
https://ide.codingblocks.com/s/48493

but ,am still getting run error on submission
please help me