#C478. Meeting Schedule Checker

    ID: 48355 Type: Default 1000ms 256MiB

Meeting Schedule Checker

Meeting Schedule Checker

You are given a list of meeting time intervals in the form of [start, end]. Your task is to determine if a person can attend all meetings without any time overlaps.

Note: Two meetings [s1, e1] and [s2, e2] are considered non-overlapping if e1 \leq s2 or e2 \leq s1. Otherwise, they overlap.

For example, if the meetings are given as \( [ [0, 30], [5, 10], [15, 20] ] \), the output should be 0 because the meetings overlap. Conversely, for \( [ [7, 10], [2, 4] ] \) the output should be 1.

inputFormat

The first line contains an integer \( n \) representing the number of meeting intervals. Each of the next \( n \) lines contains two space-separated integers representing the start and end times of a meeting interval.

Note: If \( n = 0 \), then there are no intervals.

outputFormat

Output a single integer: 1 if a person can attend all the meetings without any overlaps, and 0 otherwise.

## sample
0
1

</p>