astar0n's blog

By astar0n, history, 4 weeks ago, In English,

380C In this problem I have sumbitted Solution which got failed test case 13. I don't know how to not get my time limit exceede. I have seen other users solution, but nothing I can understand as most of them seem to use same recursive method which is same as implementation of segment tree. I have read a blog post of efficient implementation. But I don't understand why my solution couldn't pass the test 13 with an error of time limit exceeded. Can someone help me with this ?? Thanks for your help.

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

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

In your build function, have you tried passing the string in by reference?