Alex is organizing the next coding bootcamp at your university. Between managing speakers, coordinating with professors and answering questions in Discord, he's forgotten to plan the most crucial part: lunch breaks.
The bootcamp day starts at time $$$0$$$ and lasts $$$T$$$ units of time. Alex has scheduled $$$N$$$ presentations, where presentation $$$i$$$ occupies the time interval $$$[s_i, e_i)$$$. To arrange the food break, Alex needs to find the largest gap between presentations.
A gap is a maximal time interval $$$[a, b)$$$ during the day where no presentations are scheduled (that is, $$$0 \leq a \lt b \leq T$$$ and no presentation overlaps with $$$[a, b)$$$). Your task is to find the length of the largest gap.
The first line contains two integers $$$N$$$ ($$$1 \leq N \leq 10^5$$$) and $$$T$$$ ($$$1 \leq T \leq 10^9$$$) — the number of presentations and the length of the day.
Each of the next $$$N$$$ lines contains two integers $$$s_i$$$ and $$$e_i$$$ ($$$0 \leq s_i \lt e_i \leq T$$$) — the start and end times of presentation $$$i$$$. Presentation $$$i$$$ occupies the half-open interval $$$[s_i, e_i)$$$, meaning it includes time $$$s_i$$$ but not time $$$e_i$$$.
Output one integer — the length of the largest gap between presentations.
4 605 1050 5525 3015 20
20
| Name |
|---|


