Help Needed

Hi, Can someone tell me the reason for WA in the following hash-based solution, for the problem.Is it because of collision or I have made some mistake in implementation? Thanks .