Approximation algorithms for knapsack problems with cardinality constraints