Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

suspicious_wow's blog

By suspicious_wow, history, 11 years ago, In English

I am trying to solve this spoj problem related to strings and i am constantly getting time limit exceeded.here is my solution .Any help would be appreciated ! thanks :)

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
11 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

You should notice that taking the substrings then concatenate them is not O(1) but O(|S|), then you method should be O(|S|2)