Блог пользователя aajjbb

Автор aajjbb, 10 лет назад, По-английски

Hi.

I'm trying to solve this problem from Live Archive Link.

I'm receiving Wrong Answer and the test data isn't available online. To briefly explain my solution, I pre-process the hashing function for the whole string, and them take the hash of the slices I want from this array and apply it's inverse module to normalize the prime powers. Is there something wrong with this approach ?

My Code

Thanks in advance.

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Here's my AC solution: http://ideone.com/6AVLRk

You can generate random inputs and compare with your output.