Home > Back-end >  Compatible with the task, bosses, genuflect is begged to write it
Compatible with the task, bosses, genuflect is begged to write it

Time:10-19

Equipped with n task, where each task has a start time si and an end time ei, and siInput format:
The first line of an integer n (1 & lt;=n<=1000);
The next n lines, each line two integer si and ei,
The output format:
Compatible with each other in the largest number of tasks,
Input the sample:
4
1 3
4 6
2 5
1 7
The output sample:
2