Rod cutting problem TLE error

i dont understand why my coding give TLE error
link: https://ide.codingblocks.com/s/284193