14990 - RedCapeFlyingCat's Nested Rectangles 2
|
Time |
Memory |
| Case 1 |
1 sec |
32 MB |
| Case 2 |
1 sec |
32 MB |
| Case 3 |
1 sec |
32 MB |
| Case 4 |
1 sec |
32 MB |
| Case 5 |
1 sec |
32 MB |
| Case 6 |
1 sec |
32 MB |
| Case 7 |
1 sec |
32 MB |
| Case 8 |
1 sec |
32 MB |
| Case 9 |
1 sec |
32 MB |
| Case 10 |
1 sec |
32 MB |
Description
Two axis-aligned rectangles and are given. Determine their relationship:
- If contains (a rectangle's own boundary counts as part of it), output
A.
- Otherwise, if contains , output
B.
- Otherwise, and overlap (their intersection has positive area); output
Overlap.
If and are identical, output A. It is guaranteed that and always have a positive-area intersection, so the answer is always A, B, or Overlap.
Note
The image below is the sample test case.
Subtasks
| Testcase |
Constraints |
| 1-5 |
The answer is guaranteed to be A or B. |
| 6-10 |
No additional constraint. |
Input
Eight lines, each with one integer. For a rectangle , its bottom-left corner is and its top-right corner is ( increases rightward, increases upward).
- Line 1:
- Line 2:
- Line 3:
- Line 4:
- Line 5:
- Line 6:
- Line 7:
- Line 8:
Constraint:
- and (likewise for ): rectangles are never degenerate
- and always have a positive-area intersection
Output
One line containing A, B, or Overlap.
Tags