Knapsack queries

Правка en1, от Loserinlife, 2023-12-14 06:02:03

Given n objects the ith of each cost ai.

Given q queries in the form of s,a, b.

Count the number of subsets that contains a and b but sum of cost does not exceed s.

K is the sum of all Ai

N,Q,K<=4000

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Loserinlife 2023-12-14 06:02:03 231 Initial revision (published)