LIFE_GOES_ON's blog

By LIFE_GOES_ON, history, 4 years ago, In English

How to solve this 1313C2 - Skyscrapers (hard version) with segment tree ?

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

»
4 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

  • »
    »
    4 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.

    • »
      »
      »
      4 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.

      • »
        »
        »
        »
        4 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 .