A-E HASH FUNCTION

can anyone say that why this problem happen?
when I submit my program on the website which is the name ideone.com(c++(gcc-4.3.4)) I always get wrong answer(i.e., 0) but when I check my computer I get true answer. this my code and this is program