Arrays-Target Sum Pairs testcase fails

I have used hashing for the above problem but my 1 test case is failing, I have tried all ways for
the same
https://ide.codingblocks.com/s/71647

@TheAlgo hey dhiraj the output of the question for this case
for eg
5
5
2
3
4
1
6
giving output
1 and 5
2 and 4
3 and 3
but expected output is
1 and 5
2 and 4
so apply a condition before printing statement
it->first!=r
if this condition valid then only print

ok i will check it and submit the code once more