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

Автор _kryptonyte_, история, 9 лет назад, По-английски

I am having problem with this problem. link

Here is my solution , link

I don't know why it gives me WA on test case 36. the test case is big so i can't debug it. Can anybody tell me what's the problem. I am using Z algorithm.

The Idea is, (two string is concatenated with '\x7F' hexadecimal value)

  • Calculate z value for b+a ==> value goes to zba[]

  • Calculate z value for a+reverse(b) ==> value goes to zarb[]

  • Calculate z value for reverse(a)+b ==> value goes to zrab[]

then iterate through zba( from b.size()+1 to the end ) Calculate (i,j) stated in the problem. Check (0...i) string from zarb[] and check (j..n-1) from zrab[].

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

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

Auto comment: topic has been updated by _kryptonyte_ (previous revision, new revision, compare).

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

Auto comment: topic has been updated by _kryptonyte_ (previous revision, new revision, compare).