Target sum triplets

i am getting run code error for 4 testcases and correct for 5th
https://ide.codingblocks.com/s/206840 this is my code

Length of Array should be between 1 and 1000.
So increase the size of array to 1000