int computeArea(int A, int B, int C, int D, int E, int F, int G, int H) {

```
if(G<=A||E>=C||D<=F||B>=H){
return (C-A)*(D-B)+(G-E)*(H-F);
}
if(A==C||B==D){
return (G-E)*(H-F);
}
if(E==G||H==F){
return (C-A)*(D-B);
}
int tot=(C-A)*(D-B)+(G-E)*(H-F);
int coverwidth=0;
int coverheight=0;
coverwidth=(G>C?C:G)-(E>A?E:A);
coverheight=(D>H?H:D)-(B>F?B:F);
return tot-coverwidth*coverheight;
```

}

But I don't know how to make it faster. Does any one know how to speed it up?