ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1196. History Exam

Weak testsets
Posted by gvsmirnov 7 Oct 2009 03:19
With hashing function f(x) = x & (2^16 - 1), we get AC if we assume that no two different x have the same hash, which, obviously, is wrong.
UPD: Even worse, 2^15 - 1 works as well.

Edited by author 07.10.2009 03:21
Re: Weak testsets
Posted by tiancaihb 10 Oct 2009 05:08
They can't make test for every hash func. You use 2^16-1, I use -2 or mod 500000 etc, how can they figure out those all?