1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
struct node
{
node(){}
vector<short> ensemble_restant;
vector<short> pin_preparation;
int done;
};
{
node new_top;
new_top.done=top.done;
new_top.ensemble_restant.resize(top.ensemble_restant.size()-1);
copy(top.ensemble_restant.begin(),top.ensemble_restant.begin()+c,new_top.ensemble_restant.begin());
copy(top.ensemble_restant.begin()+c+1,new_top.ensemble_restant.end(),new_top.ensemble_restant.begin()+c);
int taille=top.pin_preparation.size();
cout<<"flag1"<<endl;
new_top.pin_preparation.resize(taille);
cout<<"flag2"<<endl;
copy(top.pin_preparation.begin(),top.pin_preparation.end(),new_top.pin_preparation.begin());
new_top.pin_preparation.push_back(top.ensemble_restant[c]);
sort(new_top.pin_preparation.begin(),new_top.pin_preparation.end());
to_do.push_back(new_top);
} |