passed 2069D in contest with a wrong string hasher

Revision en2, by kr25161, 2025-03-08 15:18:58

what is wrong submission but passed 306759678

this is the changed one and passed which i think is correct 309488880

ask gives hash of string from l to r

whats wrong : inv[i] gives modular inverse of factorial of i

whats correct : inv[i] should be modular inverse of power of i base prime (P)

why i think this has happened : maybe due to combined probability of binary search, unsufficient tests, and bunch of luck i manage to AC the problem XD

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English kr25161 2025-03-08 15:18:58 19
en1 English kr25161 2025-03-08 15:18:16 809 Initial revision (published)