Showing wrong answer for 4/5 test cases

my code : https://ide.codingblocks.com/s/223330

if in line 22 you use : if (!(binary_search(a, a + n, b[i]))) then it gives correct answer.

but why is line 22 wrong? I was taught that if index obtained using lower_bound function comes out equal to ā€˜n’ then the no. is not present in the array.


it is working