Problem Statement
Problem Description
You are given two closed intervals, A and B. Each interval is defined by a pair of integers:
- Interval A: [l1, r1]
- Interval B: [l2, r2]
Your task is to determine the relationship between these two intervals. There are five possible relationships:
- Disjoint: The intervals do not overlap or touch.
- Touching: The intervals touch at exactly one point (e.g., [1,3] and [3,5]).
- Overlapping: The intervals partially overlap but neither contains the other.
- A contains B: Interval A fully contains interval B.
- B contains A: Interval B fully contains interval A.
Examples
- Input:
1 5 6 9β Output:Disjoint - Input:
2 8 3 7β Output:A contains B
Analyze the intervals and print the correct relationship.