Hamim99's blog

By Hamim99, history, 6 weeks 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

»
6 weeks 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.