~/algor $ cat duels/552
Duel #552
A 1v1 battle on the problem «Intersection area».
Winner: Sojida Otaqulova
The winner was the first to solve it correctly — in 2 min 19 s.
Intersection area
Two rectangles with sides parallel to the coordinate axes are given on the plane. The first has its lower-left corner at $(x_{1}; y_{1})$ and upper-right corner at $(x_{2}; y_{2})$; the second at $(x_{3}; y_{3})$ and $(x_{4}; y_{4})$. Find the area of their common part. If there is no common part, or it is only a segment or a point, the area is $0$.
Sample tests
0 0 4 3 2 1 6 5
4
0 0 2 2 3 0 5 2
0
Battle results compared
1v1 reportSubmission timeline (1)
All submissionsSojida Otaqulova won
The 1v1 battle ended after a hard fight.
1v1 DUEL IS STARTING
Loading the arena...