your method is so clean and beautiful~!

but the sorting part slow down a little bit.

int computeArea(int A, int B, int C, int D, int E, int F, int G, int H)
{
int temp,total = (C-A) * (D-B) + (G-E) * (H-F);
if (C<=E || A>=G || B>=H || D<=F )
return total;
else
{
if(A>C)
{
temp=A;
A=C;
C=temp;
}
if(E>G)
{
temp=E;
E=G;
G=temp;
}
if(B>D)
{
temp=B;
B=D;
D=temp;
}
if(F>H)
{
temp=F;
F=H;
H=temp;
}
total = total - ( min(C,G) - max(A,E))*(min(D,H)- max(B,F));
return total;
}
}