CodeLab Academy 📞 9936 6696
← List Python · Level 10: Algorithms Code · 100 points ← #937 #939 →

#938. Fewest platforms

You get the arrival and departure time [a, d] of each train (both included). Find the largest number of trains that are at the station at the same time. ### Input n, then n lines `a d`. ### Output A number.

Examples

Input
1
9 15
Output
1
Input
6
1 7
11 15
12 13
0 5
10 14
7 11
Output
3

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!