#C7210. Maximum Overlapping Events
Maximum Overlapping Events
Maximum Overlapping Events
You are given a set of events, each defined by its start time and end time. Two events are considered overlapping if their time intervals have any common intersection. Formally, for two events with intervals ([s_1, e_1]) and ([s_2, e_2]), they overlap if and only if (s_1 \leq e_2) and (s_2 \leq e_1). Your task is to compute the maximum number of events that overlap at any point in time.
inputFormat
The input is read from standard input (stdin). The first line contains a single integer (N) — the number of events. Each of the following (N) lines contains two space-separated integers (s) and (e) representing the start time and end time of an event.
outputFormat
Output a single integer to standard output (stdout), which is the maximum number of overlapping events at any moment.## sample
1
1 2
1
</p>