#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
struct node{
int l,r;
}a[100005];
int sum[100005];
int main()
{
ios::sync_with_stdio(false);
int n;
cin>>n;
for(int i=1;i<=n;i++)
cin>>a[i].l>>a[i].r;
for(int i=1;i<=n;i++) sum[a[i].l]++,sum[a[i].r]--;
int ans=0,k=0;
for(int i=0;i<=100000;i++){
k+=sum[i];
ans=max(ans,k);
}
cout<<ans;
}
05-08
966
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-23
309
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)