Help needed in PAIRSUM2

I can’t figure out what is wrong with my code . Please help !!
https://www.codechef.com/viewsolution/26856750