Hashing, element exist or not

I am getting all test case getting failed, though output is correct. Please check my code: https://ide.codingblocks.com/s/351027