code_kit's blog

By code_kit, history, 3 years ago, In English

Hi guys, Am trying to solve this problem My algorithm is create a string which fits the given condition. i.e. vector of vector of chars. And use the Z algorithm to compute the longest prefix starting from the indexes given in the statement and check if it is atleast as length as p. But to my suprise i am getting memory limit exceeded on test 3 and i could not figure out what is going on here. Can someone plz tell me. My solution is Thanks

Read more »

  • Vote: I like it
  • -6
  • Vote: I do not like it