Question about hashing

Revision en1, by ajecc, 2017-06-21 22:05:40

Hello! I was working on this problem: 126B - Пароль. I couldn't come up with a solution so I checked other people's sources. I came across this one that uses hashing: 847891. My question is: how does that solution work, when most values of the arrays p and hash are overflown? I don't see any %MOD operation, which makes this strange to me, as I am not very experimented with hashing.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ajecc 2017-06-21 22:05:40 421 Initial revision (published)