j = 0
Scheme[][] = ‘0’;
desalination[] = ‘0’;
While(j<8&&Bi<0&&array[j][1]*Cost<FCost)
{
If(Barray[j][0]>0)
{
/*supply for the poor*/
Bi = Bi+1;
Barray[j][0] = Barray[j][0] -1;
Scheme[i][array[j][0]] ++; // narray[j][0] have offer a unit water to nj
}
Else
{
j++;
}
}
If(j==5)
{
desalination[i]=1; // nj need to do some desalination to complement the lack of water
/*Nearby ten province can’t supply the water requirements or the cost of transferring
are more expensive than the cost of desalination. So the province need to pay more
attention to improving the science technology and to do more desalination to complement
water resource . */
}
123
最新推荐文章于 2023-03-15 10:16:06 发布