Where i am getting wrong

small dp table , make it large 201 201 201

its giving wrong output and segemenation fault plz look into the code and rectify where i am going wrong

I already told u. Make the dp table
dp[201][201][201]

giving segmenatation fault,have run the code??