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 1700. Awakening

To Admins. Weak hashing tests.
Posted by d3m0n1c 19 Jun 2013 19:17
Words can be easily hashed like:
int hash = 0;
while(..){ hash = hash * 31 + 'readed byte' }

So equals will looks like:

        @Override
        public boolean equals(Object o) {
            return this.hash == o.hashCode();
        }