Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- long long wb(long long c)
- {
- if(c<0) return -c;
- else return c;
- }
- int main()
- {
- long long x1,y1,x2,y2,x3,y3,x4,y4,x,y,xx,yy;
- cin>>x1>>y1>>x2>>y2>>x3>>y3>>x4>>y4;
- x = max(x1,x3);
- y = min(y1,y3);
- xx = min(x2,x4);
- yy = max(y2,y4);
- cout<<wb((x-xx)*(y-yy));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement