Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. long long wb(long long c)
  6. {
  7. if(c<0) return -c;
  8. else return c;
  9. }
  10. int main()
  11. {
  12. long long x1,y1,x2,y2,x3,y3,x4,y4,x,y,xx,yy;
  13. cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
  14. x = max(x1,x3);
  15. y = min(y1,y3);
  16. xx = min(x2,x4);
  17. yy = max(y2,y4);
  18. cout<<wb((x-xx)*(y-yy));
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement