Dynamic programming question

前端 未结 5 775
北海茫月
北海茫月 2021-02-02 02:55

A circus is designing a tower routine consisting of people standing atop one another’s shoulders. For practical and aesthetic reasons, each person must be both shorter and light

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-02 03:02

    Result of 1 and 2 has to be same. It's not possible that one of them is shorter, because in a solution elements are descending both in height and weight so if it satisfies 1 or 2 it will satisfy the other as well, If it would be shorter it wouldn't be the longest.

提交回复
热议问题