Pair of roses (divide and conquer approach)

I’m getting WA in this question.
please help
code:https://ide.codingblocks.com/s/233573

Change line 19 to for(int i=0;i<n-1;i++)
Change line 20 to auto lb = lower_bound(a+i+1,a+n,m-a[i])
Change line 22 to if(index!=n&&a[index]==m-a[i])