Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years. ×

### tzc___wk's blog

By tzc___wk, history, 2 months ago, ,

You're given $n$ integers $a_1,a_2,\dots,a_n$, you need to count the number of ways to choose some of them (no duplicate) to make the sum equal to $S$. Print the answer in modulo $10^9+7$. How to solve this problem in polynomial time?

Read more »

• -3

By tzc___wk, history, 4 months ago, ,

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.

Read more »

• +3

By tzc___wk, history, 5 months ago, ,

Is it a bug or it is done intentially? Two contests with similar title make me feel nervous.

MikeMirzayanov Vovuh please give a response after reading this blog.

UPD: the contest name has already been undated.

Read more »

• +1