_FAHA_'s blog

By _FAHA_, history, 6 years ago, In English

In Light OJ1301 what is the simplest idea to solve it ? My code here . It got TLE . I know the approach is wrong but can't figure it out. Please anyone help.

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
6 years ago, # |
  Vote: I like it +3 Vote: I do not like it

You need to find maximum value in any time. keep two arrays start and end . sort them then merge them then find maximum value in any time. There is a good explanation here.