LIFE_GOES_ON's blog

By LIFE_GOES_ON, history, 5 years ago, In English
  • Vote: I like it
  • +4
  • Vote: I do not like it

»
5 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Here is my submision for this problem Your text to link here... If you want any more specification I can write it

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    I have solve it greedily . Please explain how you have approached with segment tree.

    • »
      »
      »
      5 years ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      I am also using greedy algorithm, but my reason to use segment tree is to find the nearest small number for each number.

      • »
        »
        »
        »
        5 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        owwwwwwwwwwwwwwwww. The part I did with stack you did with segment tree. Thanks .