#include <iostream>
using namespace std;
class Object;
template <class Typew, class Typep>
Typep Knapsack(Typep *p, Typew *w, Typew c, int n);
void MergeSort(Object *, int);
class Object
{
public:
int operator <= (Object a)const
{
return (d >= a.d);
}
int ID;
float d;
};
template <class Typew, class Typep>
class Knap
{
public:
Typep Bound(int);
void Backtrack(int );
Typew c;//weight constrain of the ba