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

Автор Hamim99, история, 3 года назад, По-английски

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.

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

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

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.