include<bits/stdc++.h>
using namespace std;
int h[100005],m[100005],a[100005];
int main(){
int n,H,M;
cin>>n>>H>>M;
a[0]=H60+M;
for(int i=1;i<=n;i++){
cin>>h[i]>>m[i];
a[i]=h[i]60+m[i];
}
sort(a,a+n+1);
for(int i=0;i<=n;i++){
if(a[i]==H*60+M){
cout<<i+1;
return 0;
}
}
return 0;
}
發貨時間