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

A knapsack optimizing problem

Revision en2, by tzc___wk, 2019-12-06 17:02:56

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?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English tzc___wk 2019-12-06 17:02:56 19 Tiny change: 'ual to $S$, in modulo' -> 'ual to $S$. Print the answer in modulo'
en1 English tzc___wk 2019-12-06 17:01:08 246 Initial revision (published)