Questions about hashing

Revision en1, by VOI27, 2026-10-17 16:48:06

As far as I know, hashing is a powerful tool to compare two strings in O(1) but it has an error rate; especially in online contests, where I saw so many submissions were hacked because of it. Therefore, I have some questions:

  1. Should I use hashing in online contests, or it is only good for offline competitions? And if yes, how should I use it to both meet the time limit and make it difficult to hack?
  2. Are there any alternatives to hashing which can't be hacked that run in O(1) or O(log(n))?

I appreciate your time reading and answering my questions.

Tags hashing

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English VOI27 2026-10-17 16:48:06 588 Initial revision (published)