Download
#include
ILOSTLBEGIN
class IlcIntSelectMaxI : public IlcIntSelectI {
public:
IlcIntSelectMaxI(){};
virtual IlcInt select(IlcIntVar var);
};
IlcInt IlcIntSelectMaxI::select(IlcIntVar var){
return var.getMax();
}
IlcIntSelect IlcIntSelectMax(IlcManager m){
return IlcIntSelect(new (m.getHeap()) IlcIntSelectMaxI());
}
void prob007large(IlcManager m, int n){
IlcIntVarArray x(m, n, 0, n-1);
IlcIntVarArray y(m, n-1, 1, n-1);
int i;
for (i=0; i1)? atoi(argv[1]): 10;
prob007(m, n);
//prob007AC(m, n);
int sol=0;
//m.nextSolution();
// m.nextSolution();
//m.out() << x << endl;
while(m.nextSolution()){
sol++;
}
m.out() << sol << endl;
m.printInformation();
m.end();
return 0;
}