设从A市运x台到C市,运费400x元,运(12-x)台到D市,运费800(12-x)元;从B市运(10-x)台到C市,运费300(10-x)元,运6-(10-x)=(x-4)台到D市,运费500(x-4)元.则总运费是:400x+800(12-x)+300(10-x)+500(x-4)=8,所以x=8,9,10,即有3种方案,
(1)从A运8到C,运4到D;从B运2到C,运4到D;
(2)从A运9到C,运3到D;从B运1到C,运5到D;
(3)..A..10.C,...2..D;...B..0..C,...6..D.