Блог пользователя rlajkalspowq

Автор rlajkalspowq, история, 5 лет назад, По-английски

I'm recently thinking of a problem. Given a sequence $$$a$$$, find the value of $$$\sum_{l=1}^n \sum_{r=l+1}^n lis(a[l...r])$$$. Where $$$lis(a)=$$$ the longest non-decreasing sequence of $$$a$$$ and $$$n$$$ is the length of $$$a$$$. $$$n$$$ is large to $$$10^5$$$ and $$$a_i$$$ is extremely small, only $$$20$$$? I can't think of a solution. Can anyone help me? Please.

Теги lis
  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Did you make up this problem or was it found online?