Hamim99's blog

By Hamim99, history, 3 years ago, In English

Verdict: Memory limit exceeded on Test 7
Problem link:https://acm.timus.ru/problem.aspx?space=1&num=1269
My code: https://pastebin.com/BeAwCYN5
My idea: I split the Aho-corasik tree into 5 parts.
Thanks in advance.

  • Vote: I like it
  • +4
  • Vote: I do not like it

»
3 years ago, # |
  Vote: I like it +1 Vote: I do not like it

I have an idea, maybe you can try it. Split a byte into the upper four bits and the lower four bits, and then the successor of a node can be reduced from 128 to 16, the tree will become higher, but it saves memory.

  • »
    »
    3 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    How I will do it,Could you please explain?