A knapsack optimizing problem

Правка en3, от rlajkalspowq, 2020-04-01 06:00:51

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?

Note: The $$$n,S$$$ can be as large as $$$10^5$$$ so using single DP can't work. Using polygon $$$ln$$$ or $$$exp$$$ might work. But I don't know how to use them (I've just heard of it). Can anyone explain it?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский rlajkalspowq 2020-04-01 06:00:51 197
en2 Английский rlajkalspowq 2019-12-06 17:02:56 19 Tiny change: 'ual to $S$, in modulo' -> 'ual to $S$. Print the answer in modulo'
en1 Английский rlajkalspowq 2019-12-06 17:01:08 246 Initial revision (published)