function ss=LiuXiong(A,B)

N=200; % number of discretizations
minX=min(A(1),B(1)); % the range
maxX=max(A(4),B(4));
X=linspace(minX,maxX,N);

uA=mg(X,A(5:8),[0 A([9 9]) 0]);
vA=1-mg(X,A(1:4));
uB=mg(X,B(5:8),[0 B([9 9]) 0]);
vB=1-mg(X,B(1:4));

ss=sum(min(1,1+.5*(vA-vB+1-(uA-uB+1))))/N;

